summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS.md4
-rw-r--r--DONORS.md40
-rw-r--r--SConstruct16
-rw-r--r--core/command_queue_mt.h6
-rw-r--r--core/math/triangulate.cpp42
-rw-r--r--core/math/triangulate.h5
-rw-r--r--doc/classes/@GDScript.xml2
-rw-r--r--doc/classes/@GlobalScope.xml2
-rw-r--r--doc/classes/@NativeScript.xml2
-rw-r--r--doc/classes/@VisualScript.xml2
-rw-r--r--doc/classes/AABB.xml2
-rw-r--r--doc/classes/ARVRAnchor.xml2
-rw-r--r--doc/classes/ARVRCamera.xml2
-rw-r--r--doc/classes/ARVRController.xml2
-rw-r--r--doc/classes/ARVRInterface.xml2
-rw-r--r--doc/classes/ARVROrigin.xml2
-rw-r--r--doc/classes/ARVRPositionalTracker.xml2
-rw-r--r--doc/classes/ARVRServer.xml2
-rw-r--r--doc/classes/AStar.xml2
-rw-r--r--doc/classes/AcceptDialog.xml2
-rw-r--r--doc/classes/AnimatedSprite.xml2
-rw-r--r--doc/classes/AnimatedSprite3D.xml2
-rw-r--r--doc/classes/Animation.xml2
-rw-r--r--doc/classes/AnimationPlayer.xml2
-rw-r--r--doc/classes/AnimationTreePlayer.xml2
-rw-r--r--doc/classes/Area.xml8
-rw-r--r--doc/classes/Area2D.xml2
-rw-r--r--doc/classes/Array.xml2
-rw-r--r--doc/classes/ArrayMesh.xml2
-rw-r--r--doc/classes/AtlasTexture.xml2
-rw-r--r--doc/classes/AudioBusLayout.xml2
-rw-r--r--doc/classes/AudioEffect.xml2
-rw-r--r--doc/classes/AudioEffectAmplify.xml2
-rw-r--r--doc/classes/AudioEffectBandLimitFilter.xml2
-rw-r--r--doc/classes/AudioEffectBandPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectChorus.xml2
-rw-r--r--doc/classes/AudioEffectCompressor.xml2
-rw-r--r--doc/classes/AudioEffectDelay.xml2
-rw-r--r--doc/classes/AudioEffectDistortion.xml2
-rw-r--r--doc/classes/AudioEffectEQ.xml2
-rw-r--r--doc/classes/AudioEffectEQ10.xml2
-rw-r--r--doc/classes/AudioEffectEQ21.xml2
-rw-r--r--doc/classes/AudioEffectEQ6.xml2
-rw-r--r--doc/classes/AudioEffectFilter.xml2
-rw-r--r--doc/classes/AudioEffectHighPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectHighShelfFilter.xml2
-rw-r--r--doc/classes/AudioEffectLimiter.xml2
-rw-r--r--doc/classes/AudioEffectLowPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectLowShelfFilter.xml2
-rw-r--r--doc/classes/AudioEffectNotchFilter.xml2
-rw-r--r--doc/classes/AudioEffectPanner.xml2
-rw-r--r--doc/classes/AudioEffectPhaser.xml2
-rw-r--r--doc/classes/AudioEffectPitchShift.xml2
-rw-r--r--doc/classes/AudioEffectReverb.xml2
-rw-r--r--doc/classes/AudioEffectStereoEnhance.xml2
-rw-r--r--doc/classes/AudioServer.xml2
-rw-r--r--doc/classes/AudioStream.xml2
-rw-r--r--doc/classes/AudioStreamPlayback.xml2
-rw-r--r--doc/classes/AudioStreamPlayer.xml2
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml2
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml2
-rw-r--r--doc/classes/AudioStreamRandomPitch.xml2
-rw-r--r--doc/classes/AudioStreamSample.xml2
-rw-r--r--doc/classes/BackBufferCopy.xml2
-rw-r--r--doc/classes/BakedLightmap.xml2
-rw-r--r--doc/classes/BakedLightmapData.xml2
-rw-r--r--doc/classes/BaseButton.xml2
-rw-r--r--doc/classes/Basis.xml2
-rw-r--r--doc/classes/BitMap.xml2
-rw-r--r--doc/classes/BitmapFont.xml2
-rw-r--r--doc/classes/BoneAttachment.xml2
-rw-r--r--doc/classes/BoxContainer.xml2
-rw-r--r--doc/classes/BoxShape.xml2
-rw-r--r--doc/classes/Button.xml2
-rw-r--r--doc/classes/ButtonGroup.xml2
-rw-r--r--doc/classes/Camera.xml6
-rw-r--r--doc/classes/Camera2D.xml2
-rw-r--r--doc/classes/CanvasItem.xml2
-rw-r--r--doc/classes/CanvasItemMaterial.xml2
-rw-r--r--doc/classes/CanvasLayer.xml2
-rw-r--r--doc/classes/CanvasModulate.xml2
-rw-r--r--doc/classes/CapsuleMesh.xml2
-rw-r--r--doc/classes/CapsuleShape.xml2
-rw-r--r--doc/classes/CapsuleShape2D.xml2
-rw-r--r--doc/classes/CenterContainer.xml2
-rw-r--r--doc/classes/CheckBox.xml2
-rw-r--r--doc/classes/CheckButton.xml2
-rw-r--r--doc/classes/CircleShape2D.xml2
-rw-r--r--doc/classes/ClassDB.xml2
-rw-r--r--doc/classes/CollisionObject.xml2
-rw-r--r--doc/classes/CollisionObject2D.xml2
-rw-r--r--doc/classes/CollisionPolygon.xml2
-rw-r--r--doc/classes/CollisionPolygon2D.xml2
-rw-r--r--doc/classes/CollisionShape.xml2
-rw-r--r--doc/classes/CollisionShape2D.xml2
-rw-r--r--doc/classes/Color.xml2
-rw-r--r--doc/classes/ColorPicker.xml2
-rw-r--r--doc/classes/ColorPickerButton.xml2
-rw-r--r--doc/classes/ColorRect.xml2
-rw-r--r--doc/classes/ConcavePolygonShape.xml2
-rw-r--r--doc/classes/ConcavePolygonShape2D.xml2
-rw-r--r--doc/classes/ConeTwistJoint.xml2
-rw-r--r--doc/classes/ConfigFile.xml2
-rw-r--r--doc/classes/ConfirmationDialog.xml2
-rw-r--r--doc/classes/Container.xml2
-rw-r--r--doc/classes/Control.xml57
-rw-r--r--doc/classes/ConvexPolygonShape.xml2
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml2
-rw-r--r--doc/classes/CubeMap.xml2
-rw-r--r--doc/classes/CubeMesh.xml2
-rw-r--r--doc/classes/Curve.xml2
-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/CylinderMesh.xml2
-rw-r--r--doc/classes/DampedSpringJoint2D.xml2
-rw-r--r--doc/classes/Dictionary.xml2
-rw-r--r--doc/classes/DirectionalLight.xml2
-rw-r--r--doc/classes/Directory.xml2
-rw-r--r--doc/classes/DynamicFont.xml2
-rw-r--r--doc/classes/DynamicFontData.xml2
-rw-r--r--doc/classes/EditorExportPlugin.xml2
-rw-r--r--doc/classes/EditorFileDialog.xml2
-rw-r--r--doc/classes/EditorFileSystem.xml2
-rw-r--r--doc/classes/EditorFileSystemDirectory.xml2
-rw-r--r--doc/classes/EditorImportPlugin.xml2
-rw-r--r--doc/classes/EditorInterface.xml2
-rw-r--r--doc/classes/EditorPlugin.xml2
-rw-r--r--doc/classes/EditorResourceConversionPlugin.xml2
-rw-r--r--doc/classes/EditorResourcePreview.xml2
-rw-r--r--doc/classes/EditorResourcePreviewGenerator.xml2
-rw-r--r--doc/classes/EditorSceneImporter.xml2
-rw-r--r--doc/classes/EditorScenePostImport.xml2
-rw-r--r--doc/classes/EditorScript.xml2
-rw-r--r--doc/classes/EditorSelection.xml2
-rw-r--r--doc/classes/EditorSettings.xml2
-rw-r--r--doc/classes/EditorSpatialGizmo.xml2
-rw-r--r--doc/classes/EncodedObjectAsID.xml2
-rw-r--r--doc/classes/Engine.xml2
-rw-r--r--doc/classes/Environment.xml2
-rw-r--r--doc/classes/File.xml2
-rw-r--r--doc/classes/FileDialog.xml2
-rw-r--r--doc/classes/Font.xml2
-rw-r--r--doc/classes/FuncRef.xml2
-rw-r--r--doc/classes/GIProbe.xml2
-rw-r--r--doc/classes/GIProbeData.xml2
-rw-r--r--doc/classes/Generic6DOFJoint.xml2
-rw-r--r--doc/classes/Geometry.xml2
-rw-r--r--doc/classes/GeometryInstance.xml2
-rw-r--r--doc/classes/Gradient.xml2
-rw-r--r--doc/classes/GradientTexture.xml2
-rw-r--r--doc/classes/GraphEdit.xml2
-rw-r--r--doc/classes/GraphNode.xml2
-rw-r--r--doc/classes/GridContainer.xml2
-rw-r--r--doc/classes/GrooveJoint2D.xml2
-rw-r--r--doc/classes/HBoxContainer.xml2
-rw-r--r--doc/classes/HScrollBar.xml2
-rw-r--r--doc/classes/HSeparator.xml2
-rw-r--r--doc/classes/HSlider.xml2
-rw-r--r--doc/classes/HSplitContainer.xml2
-rw-r--r--doc/classes/HTTPClient.xml2
-rw-r--r--doc/classes/HTTPRequest.xml2
-rw-r--r--doc/classes/HingeJoint.xml2
-rw-r--r--doc/classes/IP.xml2
-rw-r--r--doc/classes/IP_Unix.xml2
-rw-r--r--doc/classes/Image.xml2
-rw-r--r--doc/classes/ImageTexture.xml2
-rw-r--r--doc/classes/ImmediateGeometry.xml2
-rw-r--r--doc/classes/Input.xml2
-rw-r--r--doc/classes/InputDefault.xml2
-rw-r--r--doc/classes/InputEvent.xml2
-rw-r--r--doc/classes/InputEventAction.xml2
-rw-r--r--doc/classes/InputEventGesture.xml2
-rw-r--r--doc/classes/InputEventJoypadButton.xml2
-rw-r--r--doc/classes/InputEventJoypadMotion.xml2
-rw-r--r--doc/classes/InputEventKey.xml2
-rw-r--r--doc/classes/InputEventMagnifyGesture.xml2
-rw-r--r--doc/classes/InputEventMouse.xml2
-rw-r--r--doc/classes/InputEventMouseButton.xml2
-rw-r--r--doc/classes/InputEventMouseMotion.xml2
-rw-r--r--doc/classes/InputEventPanGesture.xml2
-rw-r--r--doc/classes/InputEventScreenDrag.xml2
-rw-r--r--doc/classes/InputEventScreenTouch.xml2
-rw-r--r--doc/classes/InputEventWithModifiers.xml2
-rw-r--r--doc/classes/InputMap.xml2
-rw-r--r--doc/classes/InstancePlaceholder.xml2
-rw-r--r--doc/classes/InterpolatedCamera.xml2
-rw-r--r--doc/classes/ItemList.xml2
-rw-r--r--doc/classes/JSON.xml2
-rw-r--r--doc/classes/JSONParseResult.xml2
-rw-r--r--doc/classes/JavaScript.xml2
-rw-r--r--doc/classes/Joint.xml2
-rw-r--r--doc/classes/Joint2D.xml2
-rw-r--r--doc/classes/KinematicBody.xml2
-rw-r--r--doc/classes/KinematicBody2D.xml2
-rw-r--r--doc/classes/KinematicCollision.xml2
-rw-r--r--doc/classes/KinematicCollision2D.xml2
-rw-r--r--doc/classes/Label.xml2
-rw-r--r--doc/classes/LargeTexture.xml2
-rw-r--r--doc/classes/Light.xml2
-rw-r--r--doc/classes/Light2D.xml2
-rw-r--r--doc/classes/LightOccluder2D.xml2
-rw-r--r--doc/classes/Line2D.xml2
-rw-r--r--doc/classes/LineEdit.xml2
-rw-r--r--doc/classes/LineShape2D.xml2
-rw-r--r--doc/classes/LinkButton.xml2
-rw-r--r--doc/classes/Listener.xml2
-rw-r--r--doc/classes/MainLoop.xml2
-rw-r--r--doc/classes/MarginContainer.xml2
-rw-r--r--doc/classes/Marshalls.xml2
-rw-r--r--doc/classes/Material.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/MeshInstance.xml2
-rw-r--r--doc/classes/MeshInstance2D.xml2
-rw-r--r--doc/classes/MeshLibrary.xml2
-rw-r--r--doc/classes/MultiMesh.xml2
-rw-r--r--doc/classes/MultiMeshInstance.xml2
-rw-r--r--doc/classes/Mutex.xml2
-rw-r--r--doc/classes/Navigation.xml2
-rw-r--r--doc/classes/Navigation2D.xml2
-rw-r--r--doc/classes/NavigationMesh.xml2
-rw-r--r--doc/classes/NavigationMeshInstance.xml2
-rw-r--r--doc/classes/NavigationPolygon.xml2
-rw-r--r--doc/classes/NavigationPolygonInstance.xml2
-rw-r--r--doc/classes/NetworkedMultiplayerPeer.xml2
-rw-r--r--doc/classes/Nil.xml2
-rw-r--r--doc/classes/NinePatchRect.xml2
-rw-r--r--doc/classes/Node.xml2
-rw-r--r--doc/classes/Node2D.xml2
-rw-r--r--doc/classes/NodePath.xml2
-rw-r--r--doc/classes/OS.xml2
-rw-r--r--doc/classes/Object.xml2
-rw-r--r--doc/classes/OccluderPolygon2D.xml2
-rw-r--r--doc/classes/OmniLight.xml2
-rw-r--r--doc/classes/OptionButton.xml2
-rw-r--r--doc/classes/PCKPacker.xml2
-rw-r--r--doc/classes/PHashTranslation.xml2
-rw-r--r--doc/classes/PackedDataContainer.xml2
-rw-r--r--doc/classes/PackedDataContainerRef.xml2
-rw-r--r--doc/classes/PackedScene.xml2
-rw-r--r--doc/classes/PacketPeer.xml2
-rw-r--r--doc/classes/PacketPeerStream.xml2
-rw-r--r--doc/classes/PacketPeerUDP.xml2
-rw-r--r--doc/classes/Panel.xml2
-rw-r--r--doc/classes/PanelContainer.xml2
-rw-r--r--doc/classes/PanoramaSky.xml2
-rw-r--r--doc/classes/ParallaxBackground.xml2
-rw-r--r--doc/classes/ParallaxLayer.xml2
-rw-r--r--doc/classes/Particles.xml2
-rw-r--r--doc/classes/Particles2D.xml2
-rw-r--r--doc/classes/ParticlesMaterial.xml2
-rw-r--r--doc/classes/Path.xml2
-rw-r--r--doc/classes/Path2D.xml2
-rw-r--r--doc/classes/PathFollow.xml2
-rw-r--r--doc/classes/PathFollow2D.xml2
-rw-r--r--doc/classes/Performance.xml2
-rw-r--r--doc/classes/Physics2DDirectBodyState.xml2
-rw-r--r--doc/classes/Physics2DDirectBodyStateSW.xml2
-rw-r--r--doc/classes/Physics2DDirectSpaceState.xml2
-rw-r--r--doc/classes/Physics2DServer.xml2
-rw-r--r--doc/classes/Physics2DServerSW.xml2
-rw-r--r--doc/classes/Physics2DShapeQueryParameters.xml2
-rw-r--r--doc/classes/Physics2DShapeQueryResult.xml2
-rw-r--r--doc/classes/Physics2DTestMotionResult.xml2
-rw-r--r--doc/classes/PhysicsBody.xml2
-rw-r--r--doc/classes/PhysicsBody2D.xml2
-rw-r--r--doc/classes/PhysicsDirectBodyState.xml4
-rw-r--r--doc/classes/PhysicsDirectSpaceState.xml2
-rw-r--r--doc/classes/PhysicsServer.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryParameters.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryResult.xml2
-rw-r--r--doc/classes/PinJoint.xml2
-rw-r--r--doc/classes/PinJoint2D.xml4
-rw-r--r--doc/classes/Plane.xml2
-rw-r--r--doc/classes/PlaneMesh.xml2
-rw-r--r--doc/classes/PlaneShape.xml2
-rw-r--r--doc/classes/Polygon2D.xml4
-rw-r--r--doc/classes/PolygonPathFinder.xml2
-rw-r--r--doc/classes/PoolByteArray.xml2
-rw-r--r--doc/classes/PoolColorArray.xml2
-rw-r--r--doc/classes/PoolIntArray.xml2
-rw-r--r--doc/classes/PoolRealArray.xml2
-rw-r--r--doc/classes/PoolStringArray.xml2
-rw-r--r--doc/classes/PoolVector2Array.xml2
-rw-r--r--doc/classes/PoolVector3Array.xml2
-rw-r--r--doc/classes/Popup.xml2
-rw-r--r--doc/classes/PopupDialog.xml2
-rw-r--r--doc/classes/PopupMenu.xml2
-rw-r--r--doc/classes/PopupPanel.xml2
-rw-r--r--doc/classes/Position2D.xml2
-rw-r--r--doc/classes/Position3D.xml2
-rw-r--r--doc/classes/PrimitiveMesh.xml2
-rw-r--r--doc/classes/PrismMesh.xml2
-rw-r--r--doc/classes/ProceduralSky.xml2
-rw-r--r--doc/classes/ProgressBar.xml2
-rw-r--r--doc/classes/ProjectSettings.xml2
-rw-r--r--doc/classes/ProximityGroup.xml2
-rw-r--r--doc/classes/ProxyTexture.xml2
-rw-r--r--doc/classes/QuadMesh.xml2
-rw-r--r--doc/classes/Quat.xml2
-rw-r--r--doc/classes/RID.xml2
-rw-r--r--doc/classes/Range.xml2
-rw-r--r--doc/classes/RayCast.xml2
-rw-r--r--doc/classes/RayCast2D.xml2
-rw-r--r--doc/classes/RayShape.xml2
-rw-r--r--doc/classes/RayShape2D.xml2
-rw-r--r--doc/classes/Rect2.xml2
-rw-r--r--doc/classes/RectangleShape2D.xml2
-rw-r--r--doc/classes/Reference.xml2
-rw-r--r--doc/classes/ReferenceRect.xml2
-rw-r--r--doc/classes/ReflectionProbe.xml2
-rw-r--r--doc/classes/RemoteTransform.xml2
-rw-r--r--doc/classes/RemoteTransform2D.xml2
-rw-r--r--doc/classes/Resource.xml2
-rw-r--r--doc/classes/ResourceImporter.xml2
-rw-r--r--doc/classes/ResourceInteractiveLoader.xml2
-rw-r--r--doc/classes/ResourceLoader.xml2
-rw-r--r--doc/classes/ResourcePreloader.xml2
-rw-r--r--doc/classes/ResourceSaver.xml2
-rw-r--r--doc/classes/RichTextLabel.xml2
-rw-r--r--doc/classes/RigidBody.xml2
-rw-r--r--doc/classes/RigidBody2D.xml2
-rw-r--r--doc/classes/SceneState.xml2
-rw-r--r--doc/classes/SceneTree.xml2
-rw-r--r--doc/classes/SceneTreeTimer.xml2
-rw-r--r--doc/classes/Script.xml2
-rw-r--r--doc/classes/ScriptEditor.xml2
-rw-r--r--doc/classes/ScrollBar.xml2
-rw-r--r--doc/classes/ScrollContainer.xml2
-rw-r--r--doc/classes/SegmentShape2D.xml2
-rw-r--r--doc/classes/Semaphore.xml2
-rw-r--r--doc/classes/Separator.xml2
-rw-r--r--doc/classes/Shader.xml2
-rw-r--r--doc/classes/ShaderMaterial.xml2
-rw-r--r--doc/classes/Shape.xml2
-rw-r--r--doc/classes/Shape2D.xml2
-rw-r--r--doc/classes/ShortCut.xml2
-rw-r--r--doc/classes/Skeleton.xml2
-rw-r--r--doc/classes/Sky.xml2
-rw-r--r--doc/classes/Slider.xml2
-rw-r--r--doc/classes/SliderJoint.xml2
-rw-r--r--doc/classes/Spatial.xml2
-rw-r--r--doc/classes/SpatialGizmo.xml2
-rw-r--r--doc/classes/SpatialMaterial.xml2
-rw-r--r--doc/classes/SpatialVelocityTracker.xml2
-rw-r--r--doc/classes/SphereMesh.xml2
-rw-r--r--doc/classes/SphereShape.xml2
-rw-r--r--doc/classes/SpinBox.xml2
-rw-r--r--doc/classes/SplitContainer.xml2
-rw-r--r--doc/classes/SpotLight.xml2
-rw-r--r--doc/classes/Sprite.xml2
-rw-r--r--doc/classes/Sprite3D.xml2
-rw-r--r--doc/classes/SpriteBase3D.xml2
-rw-r--r--doc/classes/SpriteFrames.xml2
-rw-r--r--doc/classes/StaticBody.xml2
-rw-r--r--doc/classes/StaticBody2D.xml2
-rw-r--r--doc/classes/StreamPeer.xml2
-rw-r--r--doc/classes/StreamPeerBuffer.xml2
-rw-r--r--doc/classes/StreamPeerSSL.xml2
-rw-r--r--doc/classes/StreamPeerTCP.xml2
-rw-r--r--doc/classes/StreamTexture.xml2
-rw-r--r--doc/classes/String.xml2
-rw-r--r--doc/classes/StyleBox.xml2
-rw-r--r--doc/classes/StyleBoxEmpty.xml2
-rw-r--r--doc/classes/StyleBoxFlat.xml2
-rw-r--r--doc/classes/StyleBoxLine.xml2
-rw-r--r--doc/classes/StyleBoxTexture.xml2
-rw-r--r--doc/classes/SurfaceTool.xml2
-rw-r--r--doc/classes/TCP_Server.xml2
-rw-r--r--doc/classes/TabContainer.xml2
-rw-r--r--doc/classes/Tabs.xml2
-rw-r--r--doc/classes/TextEdit.xml2
-rw-r--r--doc/classes/Texture.xml2
-rw-r--r--doc/classes/TextureButton.xml2
-rw-r--r--doc/classes/TextureProgress.xml2
-rw-r--r--doc/classes/TextureRect.xml2
-rw-r--r--doc/classes/Theme.xml2
-rw-r--r--doc/classes/Thread.xml2
-rw-r--r--doc/classes/TileMap.xml2
-rw-r--r--doc/classes/TileSet.xml2
-rw-r--r--doc/classes/Timer.xml2
-rw-r--r--doc/classes/ToolButton.xml2
-rw-r--r--doc/classes/TouchScreenButton.xml2
-rw-r--r--doc/classes/Transform.xml2
-rw-r--r--doc/classes/Transform2D.xml2
-rw-r--r--doc/classes/Translation.xml2
-rw-r--r--doc/classes/TranslationServer.xml2
-rw-r--r--doc/classes/Tree.xml2
-rw-r--r--doc/classes/TreeItem.xml2
-rw-r--r--doc/classes/TriangleMesh.xml2
-rw-r--r--doc/classes/Tween.xml2
-rw-r--r--doc/classes/UndoRedo.xml2
-rw-r--r--doc/classes/VBoxContainer.xml2
-rw-r--r--doc/classes/VScrollBar.xml2
-rw-r--r--doc/classes/VSeparator.xml2
-rw-r--r--doc/classes/VSlider.xml2
-rw-r--r--doc/classes/VSplitContainer.xml2
-rw-r--r--doc/classes/Variant.xml2
-rw-r--r--doc/classes/Vector2.xml2
-rw-r--r--doc/classes/Vector3.xml2
-rw-r--r--doc/classes/VehicleBody.xml2
-rw-r--r--doc/classes/VehicleWheel.xml2
-rw-r--r--doc/classes/VideoPlayer.xml2
-rw-r--r--doc/classes/VideoStream.xml2
-rw-r--r--doc/classes/Viewport.xml2
-rw-r--r--doc/classes/ViewportContainer.xml2
-rw-r--r--doc/classes/ViewportTexture.xml2
-rw-r--r--doc/classes/VisibilityEnabler.xml2
-rw-r--r--doc/classes/VisibilityEnabler2D.xml2
-rw-r--r--doc/classes/VisibilityNotifier.xml2
-rw-r--r--doc/classes/VisibilityNotifier2D.xml2
-rw-r--r--doc/classes/VisualInstance.xml2
-rw-r--r--doc/classes/VisualServer.xml2
-rw-r--r--doc/classes/WeakRef.xml2
-rw-r--r--doc/classes/WebSocketClient.xml2
-rw-r--r--doc/classes/WebSocketMultiplayerPeer.xml2
-rw-r--r--doc/classes/WebSocketPeer.xml2
-rw-r--r--doc/classes/WebSocketServer.xml2
-rw-r--r--doc/classes/WindowDialog.xml2
-rw-r--r--doc/classes/World.xml2
-rw-r--r--doc/classes/World2D.xml2
-rw-r--r--doc/classes/WorldEnvironment.xml2
-rw-r--r--doc/classes/XMLParser.xml2
-rw-r--r--doc/classes/YSort.xml2
-rw-r--r--doc/classes/bool.xml2
-rw-r--r--doc/classes/float.xml2
-rw-r--r--doc/classes/int.xml2
-rw-r--r--drivers/SCsub1
-rw-r--r--drivers/gles2/SCsub7
-rw-r--r--drivers/gles2/rasterizer_canvas_gles2.cpp1147
-rw-r--r--drivers/gles2/rasterizer_canvas_gles2.h129
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp387
-rw-r--r--drivers/gles2/rasterizer_gles2.h72
-rw-r--r--drivers/gles2/rasterizer_scene_gles2.cpp235
-rw-r--r--drivers/gles2/rasterizer_scene_gles2.h258
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.cpp2061
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.h838
-rw-r--r--drivers/gles2/shader_compiler_gles2.cpp891
-rw-r--r--drivers/gles2/shader_compiler_gles2.h101
-rw-r--r--drivers/gles2/shader_gles2.cpp689
-rw-r--r--drivers/gles2/shader_gles2.h386
-rw-r--r--drivers/gles2/shaders/SCsub22
-rw-r--r--drivers/gles2/shaders/blend_shape.glsl197
-rw-r--r--drivers/gles2/shaders/canvas.glsl141
-rw-r--r--drivers/gles2/shaders/canvas_shadow.glsl49
-rw-r--r--drivers/gles2/shaders/copy.glsl72
-rw-r--r--drivers/gles2/shaders/cube_to_dp.glsl79
-rw-r--r--drivers/gles2/shaders/cubemap_filter.glsl294
-rw-r--r--drivers/gles2/shaders/effect_blur.glsl301
-rw-r--r--drivers/gles2/shaders/exposure.glsl98
-rw-r--r--drivers/gles2/shaders/particles.glsl260
-rw-r--r--drivers/gles2/shaders/resolve.glsl44
-rw-r--r--drivers/gles2/shaders/scene.glsl2113
-rw-r--r--drivers/gles2/shaders/screen_space_reflection.glsl318
-rw-r--r--drivers/gles2/shaders/ssao.glsl293
-rw-r--r--drivers/gles2/shaders/ssao_blur.glsl124
-rw-r--r--drivers/gles2/shaders/ssao_minify.glsl59
-rw-r--r--drivers/gles2/shaders/subsurf_scattering.glsl192
-rw-r--r--drivers/gles2/shaders/tonemap.glsl323
-rw-r--r--editor/editor_audio_buses.cpp3
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp1
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp7
-rw-r--r--editor/plugins/tile_set_editor_plugin.h1
-rw-r--r--editor/translations/af.po10
-rw-r--r--editor/translations/ar.po16
-rw-r--r--editor/translations/bg.po10
-rw-r--r--editor/translations/bn.po18
-rw-r--r--editor/translations/ca.po44
-rw-r--r--editor/translations/cs.po18
-rw-r--r--editor/translations/da.po19
-rw-r--r--editor/translations/de.po19
-rw-r--r--editor/translations/de_CH.po10
-rw-r--r--editor/translations/editor.pot10
-rw-r--r--editor/translations/el.po41
-rw-r--r--editor/translations/es.po84
-rw-r--r--editor/translations/es_AR.po42
-rw-r--r--editor/translations/fa.po10
-rw-r--r--editor/translations/fi.po19
-rw-r--r--editor/translations/fr.po34
-rw-r--r--editor/translations/he.po10
-rw-r--r--editor/translations/hi.po10
-rw-r--r--editor/translations/hu.po481
-rw-r--r--editor/translations/id.po711
-rw-r--r--editor/translations/is.po10
-rw-r--r--editor/translations/it.po19
-rw-r--r--editor/translations/ja.po19
-rw-r--r--editor/translations/ko.po50
-rw-r--r--editor/translations/lt.po10
-rw-r--r--editor/translations/nb.po18
-rw-r--r--editor/translations/nl.po19
-rw-r--r--editor/translations/pl.po19
-rw-r--r--editor/translations/pr.po10
-rw-r--r--editor/translations/pt_BR.po42
-rw-r--r--editor/translations/pt_PT.po49
-rw-r--r--editor/translations/ro.po10
-rw-r--r--editor/translations/ru.po49
-rw-r--r--editor/translations/sk.po10
-rw-r--r--editor/translations/sl.po10
-rw-r--r--editor/translations/sr_Cyrl.po19
-rw-r--r--editor/translations/sv.po10
-rw-r--r--editor/translations/ta.po10
-rw-r--r--editor/translations/th.po39
-rw-r--r--editor/translations/tr.po19
-rw-r--r--editor/translations/uk.po42
-rw-r--r--editor/translations/ur_PK.po10
-rw-r--r--editor/translations/vi.po10
-rw-r--r--editor/translations/zh_CN.po15
-rw-r--r--editor/translations/zh_HK.po10
-rw-r--r--editor/translations/zh_TW.po10
-rw-r--r--main/main.cpp38
-rw-r--r--methods.py720
-rw-r--r--modules/bullet/bullet_physics_server.cpp23
-rw-r--r--modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml2
-rw-r--r--modules/bullet/doc_classes/BulletPhysicsServer.xml2
-rw-r--r--modules/bullet/godot_result_callbacks.cpp23
-rw-r--r--modules/bullet/godot_result_callbacks.h7
-rw-r--r--modules/bullet/rigid_body_bullet.cpp8
-rw-r--r--modules/bullet/rigid_body_bullet.h4
-rw-r--r--modules/bullet/space_bullet.cpp15
-rw-r--r--modules/enet/doc_classes/NetworkedMultiplayerENet.xml18
-rw-r--r--modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/GDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/GDNativeLibrary.xml2
-rw-r--r--modules/gdnative/doc_classes/NativeScript.xml2
-rw-r--r--modules/gdnative/doc_classes/PluginScript.xml2
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp1
-rw-r--r--modules/gdscript/doc_classes/GDScript.xml2
-rw-r--r--modules/gdscript/doc_classes/GDScriptFunctionState.xml2
-rw-r--r--modules/gdscript/doc_classes/GDScriptNativeClass.xml2
-rw-r--r--modules/gridmap/doc_classes/GridMap.xml2
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp22
-rw-r--r--modules/gridmap/grid_map_editor_plugin.h1
-rwxr-xr-xmodules/mbedtls/SCsub2
-rw-r--r--modules/mobile_vr/config.py2
-rw-r--r--modules/mobile_vr/doc_classes/MobileVRInterface.xml2
-rw-r--r--modules/mono/SCsub10
-rw-r--r--modules/mono/config.py26
-rw-r--r--modules/mono/doc_classes/@C#.xml2
-rw-r--r--modules/mono/doc_classes/CSharpScript.xml2
-rw-r--r--modules/mono/doc_classes/GodotSharp.xml2
-rw-r--r--modules/mono/mono_gd/gd_mono_assembly.cpp3
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h2
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.cpp2
-rw-r--r--modules/regex/doc_classes/RegEx.xml2
-rw-r--r--modules/regex/doc_classes/RegExMatch.xml2
-rw-r--r--modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml2
-rw-r--r--modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml2
-rw-r--r--modules/theora/doc_classes/ResourceImporterTheora.xml2
-rw-r--r--modules/theora/doc_classes/VideoStreamTheora.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScript.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptClassConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptComment.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptCondition.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptConstructor.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptCustomNode.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptDeconstruct.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEditor.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEmitSignal.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptExpression.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunction.xml2
-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.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIndexGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIndexSet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptInputAction.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIterator.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVar.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml2
-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.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPreload.xml2
-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.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptReturn.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSceneNode.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSceneTree.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSelect.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSelf.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSequence.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSubCall.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSwitch.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptTypeCast.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableSet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptWhile.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYield.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYieldSignal.xml2
-rw-r--r--modules/webm/doc_classes/ResourceImporterWebm.xml2
-rw-r--r--modules/webm/doc_classes/VideoStreamWebm.xml2
-rw-r--r--modules/websocket/SCsub5
-rw-r--r--platform/android/AndroidManifest.xml.template2
-rw-r--r--platform/android/audio_driver_opensl.cpp1
-rw-r--r--platform/osx/detect.py2
-rw-r--r--platform/osx/os_osx.h5
-rw-r--r--platform/osx/os_osx.mm67
-rw-r--r--platform/osx/platform_config.h1
-rw-r--r--platform/server/detect.py8
-rw-r--r--platform/server/platform_config.h6
-rw-r--r--platform/windows/os_windows.cpp11
-rw-r--r--platform/windows/platform_config.h1
-rw-r--r--platform/x11/context_gl_x11.cpp50
-rw-r--r--platform/x11/context_gl_x11.h12
-rw-r--r--platform/x11/crash_handler_x11.cpp3
-rw-r--r--platform/x11/os_x11.cpp46
-rw-r--r--platform/x11/os_x11.h5
-rw-r--r--platform/x11/platform_config.h1
-rw-r--r--scene/3d/navigation.cpp1
-rw-r--r--scene/gui/gradient_edit.cpp7
-rw-r--r--scene/gui/rich_text_label.cpp11
-rw-r--r--scene/gui/tabs.cpp2
-rw-r--r--scene/gui/tree.cpp2
-rw-r--r--scene/main/viewport.cpp28
-rw-r--r--scene/resources/scene_format_text.cpp11
-rw-r--r--servers/physics_server.cpp2
-rw-r--r--servers/visual/shader_language.cpp8
-rw-r--r--thirdparty/README.md4
-rw-r--r--thirdparty/glad/glad.c43
-rw-r--r--thirdparty/glad/glad/glad.h13
-rw-r--r--thirdparty/lws/mbedtls_wrapper/include/platform/ssl_port.h2
-rw-r--r--thirdparty/lws/minilex.c272
629 files changed, 14331 insertions, 2741 deletions
diff --git a/AUTHORS.md b/AUTHORS.md
index 752300cb5b..3d7a6adf60 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -70,12 +70,14 @@ name is available.
Joshua Grams (JoshuaGrams)
Juan Linietsky (reduz)
Julian Murgia (StraToN)
+ Justo Delgado (mrcdk)
Kostadin Damyanov (Max-Might)
Leon Krause (eska014)
Marc Gilleron (Zylann)
Marcelo Fernandez (marcelofg55)
Mariano Javier Suligoy (MarianoGnu)
Mario Schlack (hurikhan)
+ Martin Sjursen (binbitten)
Masoud BH (masoudbh3)
Matthias Hölzl (hoelzl)
Max Hilbrunner (mhilbrunner)
@@ -85,8 +87,10 @@ name is available.
Ovnuniarchos
Patrick (firefly2442)
Paul Batty (Paulb23)
+ Paul Joannon (paulloz)
Pawel Kowal (pkowal1982)
Pedro J. Estébanez (RandomShaper)
+ Pieter-Jan Briers (PJB3005)
Poommetee Ketson (Noshyaar)
Przemysław Gołąb (n-pigeon)
Ralf Hölzemer (rollenrolm)
diff --git a/DONORS.md b/DONORS.md
index 6756b2c15a..52c8da4c0c 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -18,6 +18,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Gamblify <https://www.gamblify.com>
GameDev.TV <https://www.gamedev.tv>
+ Skirmish <https://skirmish.io>
## Mini sponsors
@@ -26,16 +27,17 @@ generous deed immortalized in the next stable release of Godot Engine.
Christian Uldall Pedersen
Christopher Igoe
Christoph Woinke
+ codetrotter
E Hewert
Hein-Pieter van Braam
Jamal Alyafei
Jay Sistar
- Jordan M Lucas
Matthieu Huvé
Nathan Warden
Neal Gompa (Conan Kudo)
Pascal Julien
Ruslan Mustakov
+ Sébastien Manin
Slobodan Milnovic
Stephan Lanfermann
Stoney Meyerhoeffer
@@ -62,7 +64,9 @@ generous deed immortalized in the next stable release of Godot Engine.
Josep G. Camarasa
Kris Michael
Libre-Dépanne
+ Mike King
Ranoller
+ Rob Messick
Svenne Krap
Timothy Hagberg
@@ -77,18 +81,21 @@ generous deed immortalized in the next stable release of Godot Engine.
Garrett Dockins
Guilherme Felipe de C. G. da Silva
Harman Bains
+ Henrique Alves
Karsten Bock
Laurence Bannister
+ Rami
Robert Willes
Robin Arys
ScottMakesGames
Testus Maximus
Thomas Bjarnelöf
+ Wojciech Chojnacki
Xavier Tan
Zaq Poi
+ Alexey Dyadchenko
Amanda Haldy
- Andreas Haas
Arnaud Verstuyf
Chris Brown
Chris Wilson
@@ -96,27 +103,28 @@ generous deed immortalized in the next stable release of Godot Engine.
D
Daniel Eliasinski
Eric Monson
- Ezra Theunissen
flesk
François Cantin
+ G Barnes
GGGames.org
Heath Hayes
Jeppe Zapp
Jeremi Biernacki
joe513
+ Jordan M Lucas
Juraj Móza
Justin Arnold
Justo Delgado Baudí
Leandro Voltolino
Lisandro Lorea
Markus Wiesner
+ Marty Plumbo
+ Marvin
Nick Nikitin
Pablo Cholaky
- Paolo Munoz
Patrick Schnorbus
Pete Goodwin
- Rami
- Ryan Estes
+ Phyronnaz
Ted
Travis Womack
Trent McPheron
@@ -125,6 +133,7 @@ generous deed immortalized in the next stable release of Godot Engine.
1D_Inc
Adam Carr
+ Adam Smeltzer
Alder Stefano
Alessandro Senese
Ãlvaro Domínguez López
@@ -139,10 +148,12 @@ generous deed immortalized in the next stable release of Godot Engine.
Benjamin Beshara
Ben Vercammen
Blair Allen
+ Bryan Crow
Bryanna M
Bryan Stevenson
Carwyn Edwards
Casey Foote
+ Chris Chapin
Christian Baune
Christian Winter
Collin Shooltz
@@ -152,25 +163,28 @@ generous deed immortalized in the next stable release of Godot Engine.
Daniel Mircea
David Cravens
David May
- Diego Moreira Guimarães
Dominik Wetzel
Eric Martini
Fabian Becker
fengjiongmax
Francesco Lisi
- Fredy Romero Sam
G3Dev sàrl
Geequlim
Gerrit Großkopf
+ Gerrit Procee
Gilberto K. Otubo
Guldoman
HeartBeast
Heribert Hirth
Hunter Jones
+ ialex32x
Jaime Ruiz-Borau Vizárraga
Jed Rose
Jeff Hungerford
+ Joel Fivat
+ Johannes du Randt
Jonas Yamazaki
+ Jonathan Martin
Jonathan Nieto
Jonathon
Josh 'Cheeseness' Bush
@@ -178,6 +192,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Judd
JuDelCo
Julian Murgia
+ Justin Luk
KC Chan
Kevin Boyer
Kevin Kamper Meejach Petersen
@@ -189,12 +204,13 @@ generous deed immortalized in the next stable release of Godot Engine.
Martin Novák
Matthew Fitzpatrick
Matthias Hölzl
- Maurice Meysel
Max R.R. Collada
memoryruins
mhilbrunner
Michael Dürwald
Michael Gringauz
+ Michael Labbe
+ Mikael Olsson
MoM
monokrome
Moritz Laass
@@ -203,6 +219,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Niclas Eriksen
Nik Lee
Niko Leopold
+ nivardus
Noi Sek
Oleg Tyshchenko
Pablo Seibelt
@@ -212,6 +229,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Patric Vormstein
Paul Mason
Paweł Kowal
+ Pedro Luz
Pierre-Igor Berthet
Pietro Vertechi
Piotr Kaczmarski
@@ -223,12 +241,14 @@ generous deed immortalized in the next stable release of Godot Engine.
Sasori Olkof
Scott D. Yelich
Sootstone
- Stephen Traskal
Theo Cranmore
+ Thibault Barbaroux
Thomas Bell
Thomas Herzog & Xananax
Tom Larrow
+ Tyler Stafos
UltyX
+ Victor Holt
Wout Standaert
Yu He
diff --git a/SConstruct b/SConstruct
index c320513786..4ef302cac4 100644
--- a/SConstruct
+++ b/SConstruct
@@ -354,7 +354,6 @@ if selected_platform in platform_list:
else: # 'no'
env.Append(CCFLAGS=['-w'])
env.Append(CCFLAGS=['-Werror=return-type'])
-
#env['platform_libsuffix'] = env['LIBSUFFIX']
suffix = "." + selected_platform
@@ -445,7 +444,8 @@ if selected_platform in platform_list:
methods.no_verbose(sys, env)
if (not env["platform"] == "server"): # FIXME: detect GLES3
- env.Append( BUILDERS = { 'GLES3_GLSL' : env.Builder(action = methods.build_gles3_headers, suffix = 'glsl.gen.h',src_suffix = '.glsl') } )
+ env.Append( BUILDERS = { 'GLES3_GLSL' : env.Builder(action = methods.build_gles3_headers, suffix = 'glsl.gen.h', src_suffix = '.glsl') } )
+ env.Append( BUILDERS = { 'GLES2_GLSL' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.gen.h', src_suffix = '.glsl') } )
scons_cache_path = os.environ.get("SCONS_CACHE")
if scons_cache_path != None:
@@ -497,7 +497,6 @@ screen = sys.stdout
node_count = 0
node_count_max = 0
node_count_interval = 1
-node_pruning = 8 # Number of nodes to process before prunning the cache
if ('env' in locals()):
node_count_fname = str(env.Dir('#')) + '/.scons_node_count'
# Progress reporting is not available in non-TTY environments since it
@@ -512,17 +511,15 @@ import time, math
class cache_progress:
# The default is 1 GB cache and 12 hours half life
def __init__(self, path = None, limit = 1073741824, half_life = 43200):
- global node_pruning
self.path = path
self.limit = limit
self.exponent_scale = math.log(2) / half_life
if env['verbose'] and path != None:
screen.write('Current cache limit is ' + self.convert_size(limit) + ' (used: ' + self.convert_size(self.get_size(path)) + ')\n')
- self.pruning = node_pruning
self.delete(self.file_list())
def __call__(self, node, *args, **kw):
- global node_count, node_count_max, node_count_interval, node_count_fname, node_pruning, show_progress
+ global node_count, node_count_max, node_count_interval, node_count_fname, show_progress
if show_progress:
# Print the progress percentage
node_count += node_count_interval
@@ -535,11 +532,6 @@ class cache_progress:
else:
screen.write('\r[Initial build] ')
screen.flush()
- # Prune if the number of nodes processed is 'node_pruning' or bigger
- self.pruning -= node_count_interval
- if self.pruning <= 0:
- self.pruning = node_pruning
- self.delete(self.file_list())
def delete(self, files):
if len(files) == 0:
@@ -547,7 +539,7 @@ class cache_progress:
if env['verbose']:
# Utter something
screen.write('\rPurging %d %s from cache...\n' % (len(files), len(files) > 1 and 'files' or 'file'))
- map(os.remove, files)
+ [os.remove(f) for f in files]
def file_list(self):
if self.path == None:
diff --git a/core/command_queue_mt.h b/core/command_queue_mt.h
index 3942b961d3..c1439bdc4c 100644
--- a/core/command_queue_mt.h
+++ b/core/command_queue_mt.h
@@ -309,9 +309,9 @@ class CommandQueueMT {
};
uint8_t command_mem[COMMAND_MEM_SIZE];
- uint32_t read_ptr;
- uint32_t write_ptr;
- uint32_t dealloc_ptr;
+ uint32_t read_ptr = 0;
+ uint32_t write_ptr = 0;
+ uint32_t dealloc_ptr = 0;
SyncSemaphore sync_sems[SYNC_SEMAPHORES];
Mutex *mutex;
Semaphore *sync;
diff --git a/core/math/triangulate.cpp b/core/math/triangulate.cpp
index 5bae74ac7e..563ba7268f 100644
--- a/core/math/triangulate.cpp
+++ b/core/math/triangulate.cpp
@@ -51,7 +51,8 @@ real_t Triangulate::get_area(const Vector<Vector2> &contour) {
bool Triangulate::is_inside_triangle(real_t Ax, real_t Ay,
real_t Bx, real_t By,
real_t Cx, real_t Cy,
- real_t Px, real_t Py)
+ real_t Px, real_t Py,
+ bool include_edges)
{
real_t ax, ay, bx, by, cx, cy, apx, apy, bpx, bpy, cpx, cpy;
@@ -74,10 +75,14 @@ bool Triangulate::is_inside_triangle(real_t Ax, real_t Ay,
cCROSSap = cx * apy - cy * apx;
bCROSScp = bx * cpy - by * cpx;
- return ((aCROSSbp > 0.0) && (bCROSScp > 0.0) && (cCROSSap > 0.0));
+ if (include_edges) {
+ return ((aCROSSbp > 0.0) && (bCROSScp > 0.0) && (cCROSSap > 0.0));
+ } else {
+ return ((aCROSSbp >= 0.0) && (bCROSScp >= 0.0) && (cCROSSap >= 0.0));
+ }
};
-bool Triangulate::snip(const Vector<Vector2> &p_contour, int u, int v, int w, int n, const Vector<int> &V) {
+bool Triangulate::snip(const Vector<Vector2> &p_contour, int u, int v, int w, int n, const Vector<int> &V, bool relaxed) {
int p;
real_t Ax, Ay, Bx, By, Cx, Cy, Px, Py;
const Vector2 *contour = &p_contour[0];
@@ -91,13 +96,20 @@ bool Triangulate::snip(const Vector<Vector2> &p_contour, int u, int v, int w, in
Cx = contour[V[w]].x;
Cy = contour[V[w]].y;
- if (CMP_EPSILON > (((Bx - Ax) * (Cy - Ay)) - ((By - Ay) * (Cx - Ax)))) return false;
+ // It can happen that the triangulation ends up with three aligned vertices to deal with.
+ // In this scenario, making the check below strict may reject the possibility of
+ // forming a last triangle with these aligned vertices, preventing the triangulatiom
+ // from completing.
+ // To avoid that we allow zero-area triangles if all else failed.
+ float threshold = relaxed ? -CMP_EPSILON : CMP_EPSILON;
+
+ if (threshold > (((Bx - Ax) * (Cy - Ay)) - ((By - Ay) * (Cx - Ax)))) return false;
for (p = 0; p < n; p++) {
if ((p == u) || (p == v) || (p == w)) continue;
Px = contour[V[p]].x;
Py = contour[V[p]].y;
- if (is_inside_triangle(Ax, Ay, Bx, By, Cx, Cy, Px, Py)) return false;
+ if (is_inside_triangle(Ax, Ay, Bx, By, Cx, Cy, Px, Py, relaxed)) return false;
}
return true;
@@ -121,6 +133,8 @@ bool Triangulate::triangulate(const Vector<Vector2> &contour, Vector<int> &resul
for (int v = 0; v < n; v++)
V[v] = (n - 1) - v;
+ bool relaxed = false;
+
int nv = n;
/* remove nv-2 Vertices, creating 1 triangle every time */
@@ -129,8 +143,20 @@ bool Triangulate::triangulate(const Vector<Vector2> &contour, Vector<int> &resul
for (int v = nv - 1; nv > 2;) {
/* if we loop, it is probably a non-simple polygon */
if (0 >= (count--)) {
- //** Triangulate: ERROR - probable bad polygon!
- return false;
+ if (relaxed) {
+ //** Triangulate: ERROR - probable bad polygon!
+ return false;
+ } else {
+ // There may be aligned vertices that the strict
+ // checks prevent from triangulating. In this situation
+ // we are better off adding flat triangles than
+ // failing, so we relax the checks and try one last
+ // round.
+ // Only relaxing the constraints as a last resort avoids
+ // degenerate triangles when they aren't necessary.
+ count = 2 * nv;
+ relaxed = true;
+ }
}
/* three consecutive vertices in current polygon, <u,v,w> */
@@ -141,7 +167,7 @@ bool Triangulate::triangulate(const Vector<Vector2> &contour, Vector<int> &resul
int w = v + 1;
if (nv <= w) w = 0; /* next */
- if (snip(contour, u, v, w, nv, V)) {
+ if (snip(contour, u, v, w, nv, V, relaxed)) {
int a, b, c, s, t;
/* true names of the vertices */
diff --git a/core/math/triangulate.h b/core/math/triangulate.h
index e336dc5756..b1a583d0c5 100644
--- a/core/math/triangulate.h
+++ b/core/math/triangulate.h
@@ -51,10 +51,11 @@ public:
static bool is_inside_triangle(real_t Ax, real_t Ay,
real_t Bx, real_t By,
real_t Cx, real_t Cy,
- real_t Px, real_t Py);
+ real_t Px, real_t Py,
+ bool include_edges);
private:
- static bool snip(const Vector<Vector2> &p_contour, int u, int v, int w, int n, const Vector<int> &V);
+ static bool snip(const Vector<Vector2> &p_contour, int u, int v, int w, int n, const Vector<int> &V, bool relaxed);
};
#endif
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 2444dc4cba..07e428faad 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@GDScript" category="Core" version="3.1-dev">
+<class name="@GDScript" category="Core" version="3.1">
<brief_description>
Built-in GDScript functions.
</brief_description>
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index a434c68a4f..840d884a8c 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@GlobalScope" category="Core" version="3.1-dev">
+<class name="@GlobalScope" category="Core" version="3.1">
<brief_description>
Global scope constants and variables.
</brief_description>
diff --git a/doc/classes/@NativeScript.xml b/doc/classes/@NativeScript.xml
index cc4e97314e..2bf1dc7a7c 100644
--- a/doc/classes/@NativeScript.xml
+++ b/doc/classes/@NativeScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@NativeScript" category="Core" version="3.1-dev">
+<class name="@NativeScript" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/@VisualScript.xml b/doc/classes/@VisualScript.xml
index f3a951f722..d4a924a259 100644
--- a/doc/classes/@VisualScript.xml
+++ b/doc/classes/@VisualScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@VisualScript" category="Core" version="3.1-dev">
+<class name="@VisualScript" category="Core" version="3.1">
<brief_description>
Built-in visual script functions.
</brief_description>
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index c0eb8cb417..730c395f10 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AABB" category="Built-In Types" version="3.1-dev">
+<class name="AABB" category="Built-In Types" version="3.1">
<brief_description>
Axis-Aligned Bounding Box.
</brief_description>
diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml
index 735b1a8e8f..a8366e3405 100644
--- a/doc/classes/ARVRAnchor.xml
+++ b/doc/classes/ARVRAnchor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Anchor point in AR Space
</brief_description>
diff --git a/doc/classes/ARVRCamera.xml b/doc/classes/ARVRCamera.xml
index e8cf433e2b..e74b435e11 100644
--- a/doc/classes/ARVRCamera.xml
+++ b/doc/classes/ARVRCamera.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRCamera" inherits="Camera" category="Core" version="3.1-dev">
+<class name="ARVRCamera" inherits="Camera" category="Core" version="3.1">
<brief_description>
A camera node with a few overrules for AR/VR applied such as location tracking.
</brief_description>
diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml
index e9d8f9d568..9c306c3ea4 100644
--- a/doc/classes/ARVRController.xml
+++ b/doc/classes/ARVRController.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRController" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="ARVRController" inherits="Spatial" category="Core" version="3.1">
<brief_description>
A spatial node representing a spatially tracked controller.
</brief_description>
diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml
index ed59b4329b..413370ed0b 100644
--- a/doc/classes/ARVRInterface.xml
+++ b/doc/classes/ARVRInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRInterface" inherits="Reference" category="Core" version="3.1-dev">
+<class name="ARVRInterface" inherits="Reference" category="Core" version="3.1">
<brief_description>
Base class for ARVR interface implementation.
</brief_description>
diff --git a/doc/classes/ARVROrigin.xml b/doc/classes/ARVROrigin.xml
index 1b998815aa..80626338f2 100644
--- a/doc/classes/ARVROrigin.xml
+++ b/doc/classes/ARVROrigin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVROrigin" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="ARVROrigin" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Our origin point in AR/VR.
</brief_description>
diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml
index 2d1e85e4c4..e703de36f4 100644
--- a/doc/classes/ARVRPositionalTracker.xml
+++ b/doc/classes/ARVRPositionalTracker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.1-dev">
+<class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.1">
<brief_description>
A tracked object
</brief_description>
diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml
index 8e5dc146ad..965fad1961 100644
--- a/doc/classes/ARVRServer.xml
+++ b/doc/classes/ARVRServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRServer" inherits="Object" category="Core" version="3.1-dev">
+<class name="ARVRServer" inherits="Object" category="Core" version="3.1">
<brief_description>
This is our AR/VR Server.
</brief_description>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 1a192f861b..482566ee9f 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AStar" inherits="Reference" category="Core" version="3.1-dev">
+<class name="AStar" inherits="Reference" category="Core" version="3.1">
<brief_description>
AStar class representation that uses vectors as edges.
</brief_description>
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index 614e2e9430..99a3f59487 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AcceptDialog" inherits="WindowDialog" category="Core" version="3.1-dev">
+<class name="AcceptDialog" inherits="WindowDialog" category="Core" version="3.1">
<brief_description>
Base dialog for user notification.
</brief_description>
diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml
index a4892a4c71..a6521c0cd1 100644
--- a/doc/classes/AnimatedSprite.xml
+++ b/doc/classes/AnimatedSprite.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatedSprite" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="AnimatedSprite" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Sprite node that can use multiple textures for animation.
</brief_description>
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index 358524d761..733d565676 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.1-dev">
+<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.1">
<brief_description>
2D sprite node in 3D world, that can use multiple 2D textures for animation.
</brief_description>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 96e78bae9d..ea503f8aa9 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Animation" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Animation" inherits="Resource" category="Core" version="3.1">
<brief_description>
Contains data used to animate everything in the engine.
</brief_description>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index d791cd88dd..178c714a20 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationPlayer" inherits="Node" category="Core" version="3.1-dev">
+<class name="AnimationPlayer" inherits="Node" category="Core" version="3.1">
<brief_description>
Container and player of [Animation] resources.
</brief_description>
diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml
index ca743bfb29..49b4c6b43e 100644
--- a/doc/classes/AnimationTreePlayer.xml
+++ b/doc/classes/AnimationTreePlayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationTreePlayer" inherits="Node" category="Core" version="3.1-dev">
+<class name="AnimationTreePlayer" inherits="Node" category="Core" version="3.1">
<brief_description>
Animation Player that uses a node graph for blending Animations.
</brief_description>
diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml
index 3c8a6a9269..5c56b5e21b 100644
--- a/doc/classes/Area.xml
+++ b/doc/classes/Area.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Area" inherits="CollisionObject" category="Core" version="3.1-dev">
+<class name="Area" inherits="CollisionObject" category="Core" version="3.1">
<brief_description>
General purpose area node for detection and 3D physics influence.
</brief_description>
@@ -192,7 +192,7 @@
<argument index="0" name="body" type="Object">
</argument>
<description>
- Emitted when a [PhysicsBody2D] object exits.
+ Emitted when a [PhysicsBody] object exits.
</description>
</signal>
<signal name="body_shape_entered">
@@ -205,7 +205,7 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- Emitted when a [PhysicsBody2D] object enters, reporting which shapes overlapped.
+ Emitted when a [PhysicsBody] object enters, reporting which shapes overlapped.
</description>
</signal>
<signal name="body_shape_exited">
@@ -218,7 +218,7 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- Emitted when a [PhysicsBody2D] object exits, reporting which shapes were overlapping.
+ Emitted when a [PhysicsBody] object exits, reporting which shapes were overlapping.
</description>
</signal>
</signals>
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index 3cfabee27f..c50ccefc4c 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Area2D" inherits="CollisionObject2D" category="Core" version="3.1-dev">
+<class name="Area2D" inherits="CollisionObject2D" category="Core" version="3.1">
<brief_description>
2D area for detection and 2D physics influence.
</brief_description>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 498445a027..2e2176743f 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Array" category="Built-In Types" version="3.1-dev">
+<class name="Array" category="Built-In Types" version="3.1">
<brief_description>
Generic array datatype.
</brief_description>
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 9ea76e2702..c25044b120 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.1-dev">
+<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml
index 77ddbb3343..409c40e809 100644
--- a/doc/classes/AtlasTexture.xml
+++ b/doc/classes/AtlasTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AtlasTexture" inherits="Texture" category="Core" version="3.1-dev">
+<class name="AtlasTexture" inherits="Texture" category="Core" version="3.1">
<brief_description>
Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
</brief_description>
diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml
index c4e111a792..c43da3e233 100644
--- a/doc/classes/AudioBusLayout.xml
+++ b/doc/classes/AudioBusLayout.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioBusLayout" inherits="Resource" category="Core" version="3.1-dev">
+<class name="AudioBusLayout" inherits="Resource" category="Core" version="3.1">
<brief_description>
Stores information about the audiobusses.
</brief_description>
diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml
index 4d33b458a0..acbc96e70e 100644
--- a/doc/classes/AudioEffect.xml
+++ b/doc/classes/AudioEffect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffect" inherits="Resource" category="Core" version="3.1-dev">
+<class name="AudioEffect" inherits="Resource" category="Core" version="3.1">
<brief_description>
Audio Effect For Audio.
</brief_description>
diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml
index 2c0cbff8b4..3582ddc4f7 100644
--- a/doc/classes/AudioEffectAmplify.xml
+++ b/doc/classes/AudioEffectAmplify.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectAmplify" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectAmplify" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Adds a Amplify audio effect to an Audio bus.
Increases or decreases the volume of the selected audio bus.
diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml
index c9e9520dfe..9eba806ad5 100644
--- a/doc/classes/AudioEffectBandLimitFilter.xml
+++ b/doc/classes/AudioEffectBandLimitFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
+<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core" version="3.1">
<brief_description>
Adds a band limit filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml
index cc8e351586..11aab3e86d 100644
--- a/doc/classes/AudioEffectBandPassFilter.xml
+++ b/doc/classes/AudioEffectBandPassFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
+<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core" version="3.1">
<brief_description>
Adds a band pass filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml
index 6890fc92d9..43e14b3964 100644
--- a/doc/classes/AudioEffectChorus.xml
+++ b/doc/classes/AudioEffectChorus.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectChorus" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectChorus" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Adds a chorus audio effect.
</brief_description>
diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml
index 33225a64ab..fa81bcf030 100644
--- a/doc/classes/AudioEffectCompressor.xml
+++ b/doc/classes/AudioEffectCompressor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectCompressor" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectCompressor" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Adds a Compressor audio effect to an Audio bus.
Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume.
diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml
index 1c5757eca3..7c9d11111c 100644
--- a/doc/classes/AudioEffectDelay.xml
+++ b/doc/classes/AudioEffectDelay.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectDelay" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectDelay" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Adds a Delay audio effect to an Audio bus. Plays input signal back after a period of time.
Two tap delay and feedback options.
diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml
index c33dced31e..74d12df554 100644
--- a/doc/classes/AudioEffectDistortion.xml
+++ b/doc/classes/AudioEffectDistortion.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectDistortion" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectDistortion" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Adds a Distortion audio effect to an Audio bus.
Modify the sound to make it dirty.
diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml
index f6f44f2cb6..35a6f7557d 100644
--- a/doc/classes/AudioEffectEQ.xml
+++ b/doc/classes/AudioEffectEQ.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectEQ" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Base class for audio equalizers. Gives you control over frequencies.
Use it to create a custom equalizer if [AudioEffectEQ6], [AudioEffectEQ10] or [AudioEffectEQ21] don't fit your needs.
diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml
index 201a26843c..f88a954417 100644
--- a/doc/classes/AudioEffectEQ10.xml
+++ b/doc/classes/AudioEffectEQ10.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ10" inherits="AudioEffectEQ" category="Core" version="3.1-dev">
+<class name="AudioEffectEQ10" inherits="AudioEffectEQ" category="Core" version="3.1">
<brief_description>
Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 31 Hz to 16000 Hz.
Each frequency can be modulated between -60/+24 dB.
diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml
index df0a536157..86d2189f27 100644
--- a/doc/classes/AudioEffectEQ21.xml
+++ b/doc/classes/AudioEffectEQ21.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ21" inherits="AudioEffectEQ" category="Core" version="3.1-dev">
+<class name="AudioEffectEQ21" inherits="AudioEffectEQ" category="Core" version="3.1">
<brief_description>
Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 22 Hz to 22000 Hz.
Each frequency can be modulated between -60/+24 dB.
diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml
index fe17a35d64..8f789cdbdd 100644
--- a/doc/classes/AudioEffectEQ6.xml
+++ b/doc/classes/AudioEffectEQ6.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ6" inherits="AudioEffectEQ" category="Core" version="3.1-dev">
+<class name="AudioEffectEQ6" inherits="AudioEffectEQ" category="Core" version="3.1">
<brief_description>
Adds a 6-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz.
Each frequency can be modulated between -60/+24 dB.
diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml
index 75dc9b292d..5a86c092a0 100644
--- a/doc/classes/AudioEffectFilter.xml
+++ b/doc/classes/AudioEffectFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectFilter" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectFilter" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Adds a filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml
index 148ab83cb6..3d487fc783 100644
--- a/doc/classes/AudioEffectHighPassFilter.xml
+++ b/doc/classes/AudioEffectHighPassFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
+<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" category="Core" version="3.1">
<brief_description>
Adds a high pass filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml
index e52578dc3a..ca2312ba6a 100644
--- a/doc/classes/AudioEffectHighShelfFilter.xml
+++ b/doc/classes/AudioEffectHighShelfFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
+<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml
index 6c61300e34..9e791f02d7 100644
--- a/doc/classes/AudioEffectLimiter.xml
+++ b/doc/classes/AudioEffectLimiter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectLimiter" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectLimiter" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Adds a soft clip Limiter audio effect to an Audio bus.
</brief_description>
diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml
index cc357ae9ee..3facd8b665 100644
--- a/doc/classes/AudioEffectLowPassFilter.xml
+++ b/doc/classes/AudioEffectLowPassFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
+<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" category="Core" version="3.1">
<brief_description>
Adds a low pass filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml
index be9bde1b69..aadbf30eaa 100644
--- a/doc/classes/AudioEffectLowShelfFilter.xml
+++ b/doc/classes/AudioEffectLowShelfFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
+<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml
index 7aec435bfa..741931f262 100644
--- a/doc/classes/AudioEffectNotchFilter.xml
+++ b/doc/classes/AudioEffectNotchFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
+<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" category="Core" version="3.1">
<brief_description>
Adds a notch filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml
index a75918958e..cbd14de905 100644
--- a/doc/classes/AudioEffectPanner.xml
+++ b/doc/classes/AudioEffectPanner.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectPanner" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectPanner" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Adds a Panner audio effect to an Audio bus. Pans sound left or right.
</brief_description>
diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml
index e276ed14b6..10566d089b 100644
--- a/doc/classes/AudioEffectPhaser.xml
+++ b/doc/classes/AudioEffectPhaser.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectPhaser" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectPhaser" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Adds a Phaser audio effect to an Audio bus.
Combines the original signal with a copy that is slightly out of phase with the original.
diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml
index 4e4658580a..99095bae44 100644
--- a/doc/classes/AudioEffectPitchShift.xml
+++ b/doc/classes/AudioEffectPitchShift.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectPitchShift" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectPitchShift" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Adds a Pitch shift audio effect to an Audio bus.
Raises or lowers the pitch of original sound.
diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml
index 8453e4b11b..fb2009105d 100644
--- a/doc/classes/AudioEffectReverb.xml
+++ b/doc/classes/AudioEffectReverb.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectReverb" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectReverb" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
Adds a Reverb audio effect to an Audio bus.
Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces.
diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml
index 508dc96fb0..ae296d81a0 100644
--- a/doc/classes/AudioEffectStereoEnhance.xml
+++ b/doc/classes/AudioEffectStereoEnhance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectStereoEnhance" inherits="AudioEffect" category="Core" version="3.1-dev">
+<class name="AudioEffectStereoEnhance" inherits="AudioEffect" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index 9618f0b066..0be91427b1 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioServer" inherits="Object" category="Core" version="3.1-dev">
+<class name="AudioServer" inherits="Object" category="Core" version="3.1">
<brief_description>
Server interface for low level audio access.
</brief_description>
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index cbb16c3198..d332277248 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStream" inherits="Resource" category="Core" version="3.1-dev">
+<class name="AudioStream" inherits="Resource" category="Core" version="3.1">
<brief_description>
Base class for audio streams.
</brief_description>
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index a27ab1d3a2..0960935ad9 100644
--- a/doc/classes/AudioStreamPlayback.xml
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayback" inherits="Reference" category="Core" version="3.1-dev">
+<class name="AudioStreamPlayback" inherits="Reference" category="Core" version="3.1">
<brief_description>
Meta class for playing back audio.
</brief_description>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index f7c8f76182..4a69695ae5 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayer" inherits="Node" category="Core" version="3.1-dev">
+<class name="AudioStreamPlayer" inherits="Node" category="Core" version="3.1">
<brief_description>
Plays back audio.
</brief_description>
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index 6594c9c8b9..495d37e6b8 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayer2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="AudioStreamPlayer2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Plays audio in 2D.
</brief_description>
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index 7eb1ff2b91..1ab5184684 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayer3D" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="AudioStreamPlayer3D" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Plays 3D sound in 3D space
</brief_description>
diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml
index 362504d00d..992c731d47 100644
--- a/doc/classes/AudioStreamRandomPitch.xml
+++ b/doc/classes/AudioStreamRandomPitch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamRandomPitch" inherits="AudioStream" category="Core" version="3.1-dev">
+<class name="AudioStreamRandomPitch" inherits="AudioStream" category="Core" version="3.1">
<brief_description>
Plays audio with random pitch tweaking.
</brief_description>
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml
index 224d1802dd..8b6651abe7 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamSample.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.1-dev">
+<class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.1">
<brief_description>
Plays audio.
</brief_description>
diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml
index 05a10da3ac..7070fdec4c 100644
--- a/doc/classes/BackBufferCopy.xml
+++ b/doc/classes/BackBufferCopy.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BackBufferCopy" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="BackBufferCopy" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with the texscreen() shader instruction.
</brief_description>
diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml
index 98ba28adeb..45c60302a6 100644
--- a/doc/classes/BakedLightmap.xml
+++ b/doc/classes/BakedLightmap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BakedLightmap" inherits="VisualInstance" category="Core" version="3.1-dev">
+<class name="BakedLightmap" inherits="VisualInstance" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml
index 49f09dc32b..8ee10b0b8b 100644
--- a/doc/classes/BakedLightmapData.xml
+++ b/doc/classes/BakedLightmapData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BakedLightmapData" inherits="Resource" category="Core" version="3.1-dev">
+<class name="BakedLightmapData" inherits="Resource" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 0af7b6993c..2f44179adb 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BaseButton" inherits="Control" category="Core" version="3.1-dev">
+<class name="BaseButton" inherits="Control" category="Core" version="3.1">
<brief_description>
Base class for different kinds of buttons.
</brief_description>
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 2bca7d7c1b..f7270fa5f9 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Basis" category="Built-In Types" version="3.1-dev">
+<class name="Basis" category="Built-In Types" version="3.1">
<brief_description>
3x3 matrix datatype.
</brief_description>
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
index 036e968b65..98f554ebaa 100644
--- a/doc/classes/BitMap.xml
+++ b/doc/classes/BitMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BitMap" inherits="Resource" category="Core" version="3.1-dev">
+<class name="BitMap" inherits="Resource" category="Core" version="3.1">
<brief_description>
Boolean matrix.
</brief_description>
diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml
index cff8951a4c..c943caf636 100644
--- a/doc/classes/BitmapFont.xml
+++ b/doc/classes/BitmapFont.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BitmapFont" inherits="Font" category="Core" version="3.1-dev">
+<class name="BitmapFont" inherits="Font" category="Core" version="3.1">
<brief_description>
Renders text using [code]*.fnt[/code] fonts.
</brief_description>
diff --git a/doc/classes/BoneAttachment.xml b/doc/classes/BoneAttachment.xml
index 3b7cd3fff2..a85453a415 100644
--- a/doc/classes/BoneAttachment.xml
+++ b/doc/classes/BoneAttachment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoneAttachment" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="BoneAttachment" inherits="Spatial" category="Core" version="3.1">
<brief_description>
A node that will attach to a bone.
</brief_description>
diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml
index 542703bae7..3fbad58a24 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoxContainer" inherits="Container" category="Core" version="3.1-dev">
+<class name="BoxContainer" inherits="Container" category="Core" version="3.1">
<brief_description>
Base class for box containers.
</brief_description>
diff --git a/doc/classes/BoxShape.xml b/doc/classes/BoxShape.xml
index 33ba197bec..d98a188870 100644
--- a/doc/classes/BoxShape.xml
+++ b/doc/classes/BoxShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoxShape" inherits="Shape" category="Core" version="3.1-dev">
+<class name="BoxShape" inherits="Shape" category="Core" version="3.1">
<brief_description>
Box shape resource.
</brief_description>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index 7783951cf9..382a538f2b 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Button" inherits="BaseButton" category="Core" version="3.1-dev">
+<class name="Button" inherits="BaseButton" category="Core" version="3.1">
<brief_description>
Standard themed Button.
</brief_description>
diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml
index ebeb1e0aa0..e839c3e750 100644
--- a/doc/classes/ButtonGroup.xml
+++ b/doc/classes/ButtonGroup.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ButtonGroup" inherits="Resource" category="Core" version="3.1-dev">
+<class name="ButtonGroup" inherits="Resource" category="Core" version="3.1">
<brief_description>
Group of Buttons.
</brief_description>
diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml
index 226277d178..0b7cd4ef7a 100644
--- a/doc/classes/Camera.xml
+++ b/doc/classes/Camera.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Camera" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="Camera" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Camera node, displays from a point of view.
</brief_description>
@@ -133,7 +133,7 @@
The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle.
</member>
<member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset">
- The horizontal (X) offset of the Camear viewport.
+ The horizontal (X) offset of the Camera viewport.
</member>
<member name="keep_aspect" type="int" setter="set_keep_aspect_mode" getter="get_keep_aspect_mode" enum="Camera.KeepAspect">
The axis to lock during [member fov]/[member size] adjustments.
@@ -148,7 +148,7 @@
The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since [member keep_aspect] locks on axis, [code]size[/code] sets the other axis' size length.
</member>
<member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset">
- The horizontal (Y) offset of the Camear viewport.
+ The horizontal (Y) offset of the Camera viewport.
</member>
</members>
<constants>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index 9ab1c63c1f..39cc1b84b3 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Camera2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="Camera2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Camera node for 2D scenes.
</brief_description>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index ff9eb6bfe9..1705808c04 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasItem" inherits="Node" category="Core" version="3.1-dev">
+<class name="CanvasItem" inherits="Node" category="Core" version="3.1">
<brief_description>
Base class of anything 2D.
</brief_description>
diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml
index 1a2c61000e..fe7194dcfe 100644
--- a/doc/classes/CanvasItemMaterial.xml
+++ b/doc/classes/CanvasItemMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasItemMaterial" inherits="Material" category="Core" version="3.1-dev">
+<class name="CanvasItemMaterial" inherits="Material" category="Core" version="3.1">
<brief_description>
A material for [CanvasItem]s.
</brief_description>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index d66ea5acdb..b2b0938822 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasLayer" inherits="Node" category="Core" version="3.1-dev">
+<class name="CanvasLayer" inherits="Node" category="Core" version="3.1">
<brief_description>
Canvas drawing layer.
</brief_description>
diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml
index 1595b90ca5..7740423cf5 100644
--- a/doc/classes/CanvasModulate.xml
+++ b/doc/classes/CanvasModulate.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasModulate" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="CanvasModulate" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Tint the entire canvas.
</brief_description>
diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml
index 988c500d52..3500701290 100644
--- a/doc/classes/CapsuleMesh.xml
+++ b/doc/classes/CapsuleMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CapsuleMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
+<class name="CapsuleMesh" inherits="PrimitiveMesh" category="Core" version="3.1">
<brief_description>
Class representing a capsule-shaped [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/CapsuleShape.xml b/doc/classes/CapsuleShape.xml
index c0c5e4e1f2..0c00288783 100644
--- a/doc/classes/CapsuleShape.xml
+++ b/doc/classes/CapsuleShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CapsuleShape" inherits="Shape" category="Core" version="3.1-dev">
+<class name="CapsuleShape" inherits="Shape" category="Core" version="3.1">
<brief_description>
Capsule shape for collisions.
</brief_description>
diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml
index eaa7eef8cc..488c1ddc4f 100644
--- a/doc/classes/CapsuleShape2D.xml
+++ b/doc/classes/CapsuleShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CapsuleShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
+<class name="CapsuleShape2D" inherits="Shape2D" category="Core" version="3.1">
<brief_description>
Capsule shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml
index fd2d8ee9e7..41c8cf7100 100644
--- a/doc/classes/CenterContainer.xml
+++ b/doc/classes/CenterContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CenterContainer" inherits="Container" category="Core" version="3.1-dev">
+<class name="CenterContainer" inherits="Container" category="Core" version="3.1">
<brief_description>
Keeps children controls centered.
</brief_description>
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index f2aae0a674..d37f0422bc 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CheckBox" inherits="Button" category="Core" version="3.1-dev">
+<class name="CheckBox" inherits="Button" category="Core" version="3.1">
<brief_description>
Binary choice user interface widget
</brief_description>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index 1ad7f9cc68..deba9a17b6 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CheckButton" inherits="Button" category="Core" version="3.1-dev">
+<class name="CheckButton" inherits="Button" category="Core" version="3.1">
<brief_description>
Checkable button.
</brief_description>
diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml
index 8736cd47e5..db84c82e48 100644
--- a/doc/classes/CircleShape2D.xml
+++ b/doc/classes/CircleShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CircleShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
+<class name="CircleShape2D" inherits="Shape2D" category="Core" version="3.1">
<brief_description>
Circular shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index 05f2f6472e..6b2c540c19 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ClassDB" inherits="Object" category="Core" version="3.1-dev">
+<class name="ClassDB" inherits="Object" category="Core" version="3.1">
<brief_description>
Class information repository.
</brief_description>
diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml
index 8529c68b11..22b9725121 100644
--- a/doc/classes/CollisionObject.xml
+++ b/doc/classes/CollisionObject.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionObject" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="CollisionObject" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Base node for collision objects.
</brief_description>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index 2e361b5ac1..1ef72c0ca2 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionObject2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="CollisionObject2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Base node for 2D collision objects.
</brief_description>
diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml
index b0f1142ac5..28e9ba4217 100644
--- a/doc/classes/CollisionPolygon.xml
+++ b/doc/classes/CollisionPolygon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionPolygon" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="CollisionPolygon" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Editor-only class for defining a collision polygon in 3D space.
</brief_description>
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index 8ef50cb4e0..5b940e7ff1 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Defines a 2D collision polygon.
</brief_description>
diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape.xml
index 7afd455ebd..9910de494e 100644
--- a/doc/classes/CollisionShape.xml
+++ b/doc/classes/CollisionShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionShape" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="CollisionShape" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Node that represents collision shape data in 3D space.
</brief_description>
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index 7b3cddf4aa..6d62a0ba62 100644
--- a/doc/classes/CollisionShape2D.xml
+++ b/doc/classes/CollisionShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionShape2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="CollisionShape2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Node that represents collision shape data in 2D space.
</brief_description>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 490583b427..2617aaef17 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Color" category="Built-In Types" version="3.1-dev">
+<class name="Color" category="Built-In Types" version="3.1">
<brief_description>
Color in RGBA format with some support for ARGB format.
</brief_description>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index a2b6e1ae04..2214264dca 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ColorPicker" inherits="BoxContainer" category="Core" version="3.1-dev">
+<class name="ColorPicker" inherits="BoxContainer" category="Core" version="3.1">
<brief_description>
Color picker control.
</brief_description>
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index 227d979c64..717f7e4efc 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ColorPickerButton" inherits="Button" category="Core" version="3.1-dev">
+<class name="ColorPickerButton" inherits="Button" category="Core" version="3.1">
<brief_description>
Button that pops out a [ColorPicker]
</brief_description>
diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml
index 468d9b0687..69a70cfa39 100644
--- a/doc/classes/ColorRect.xml
+++ b/doc/classes/ColorRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ColorRect" inherits="Control" category="Core" version="3.1-dev">
+<class name="ColorRect" inherits="Control" category="Core" version="3.1">
<brief_description>
Colored rect for canvas.
</brief_description>
diff --git a/doc/classes/ConcavePolygonShape.xml b/doc/classes/ConcavePolygonShape.xml
index b838e21318..f4958d88d0 100644
--- a/doc/classes/ConcavePolygonShape.xml
+++ b/doc/classes/ConcavePolygonShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConcavePolygonShape" inherits="Shape" category="Core" version="3.1-dev">
+<class name="ConcavePolygonShape" inherits="Shape" category="Core" version="3.1">
<brief_description>
Concave polygon shape.
</brief_description>
diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml
index 30dc887f3f..a653872353 100644
--- a/doc/classes/ConcavePolygonShape2D.xml
+++ b/doc/classes/ConcavePolygonShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConcavePolygonShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
+<class name="ConcavePolygonShape2D" inherits="Shape2D" category="Core" version="3.1">
<brief_description>
Concave polygon 2D shape resource for physics.
</brief_description>
diff --git a/doc/classes/ConeTwistJoint.xml b/doc/classes/ConeTwistJoint.xml
index 93901dc3c4..feb3262be0 100644
--- a/doc/classes/ConeTwistJoint.xml
+++ b/doc/classes/ConeTwistJoint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConeTwistJoint" inherits="Joint" category="Core" version="3.1-dev">
+<class name="ConeTwistJoint" inherits="Joint" category="Core" version="3.1">
<brief_description>
A twist joint between two 3D bodies
</brief_description>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index b46e96c2a0..a42d0f196e 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConfigFile" inherits="Reference" category="Core" version="3.1-dev">
+<class name="ConfigFile" inherits="Reference" category="Core" version="3.1">
<brief_description>
Helper class to handle INI-style files.
</brief_description>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index 1641b5df6f..461f48420a 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConfirmationDialog" inherits="AcceptDialog" category="Core" version="3.1-dev">
+<class name="ConfirmationDialog" inherits="AcceptDialog" category="Core" version="3.1">
<brief_description>
Dialog for confirmation of actions.
</brief_description>
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
index b6afaa6bac..db365db233 100644
--- a/doc/classes/Container.xml
+++ b/doc/classes/Container.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Container" inherits="Control" category="Core" version="3.1-dev">
+<class name="Container" inherits="Control" category="Core" version="3.1">
<brief_description>
Base node for containers.
</brief_description>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 46b2642b89..722bb5d258 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Control" inherits="CanvasItem" category="Core" version="3.1-dev">
+<class name="Control" inherits="CanvasItem" category="Core" version="3.1">
<brief_description>
All User Interface nodes inherit from Control. Features anchors and margins to adapt its position and size to its parent.
</brief_description>
@@ -117,6 +117,16 @@
<argument index="1" name="data" type="Variant">
</argument>
<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.
+ This method should only be used to test the data. Process the data in [method drop_data].
+ [codeblock]
+ extends Control
+
+ func can_drop_data(position, data):
+ # check position if it is relevant to you
+ # otherwise just check data
+ return typeof(data) == TYPE_DICTIONARY and data.has('expected')
+ [/codeblock]
</description>
</method>
<method name="drop_data" qualifiers="virtual">
@@ -127,6 +137,16 @@
<argument index="1" name="data" type="Variant">
</argument>
<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.
+ [codeblock]
+ extends ColorRect
+
+ func can_drop_data(position, data):
+ return typeof(data) == TYPE_DICTIONARY and data.has('color')
+
+ func drop_data(position, data):
+ color = data['color']
+ [/codeblock]
</description>
</method>
<method name="force_drag">
@@ -137,6 +157,8 @@
<argument index="1" name="preview" type="Control">
</argument>
<description>
+ Forces drag and bypasses [method get_drag_data] and [method set_drag_preview] by passing [code]data[/code] and [code]preview[/code]. Drag will start even if the mouse is neither over nor pressed on this control.
+ The methods [method can_drop_data] and [method drop_data] must be implemented on controls that want to recieve drop data.
</description>
</method>
<method name="get_begin" qualifiers="const">
@@ -186,6 +208,16 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
+ Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Return null if there is no data to drag. Controls that want to recieve 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.
+ [codeblock]
+ extends Control
+
+ func get_drag_data(position):
+ var mydata = make_data()
+ set_drag_preview(make_preview(mydata))
+ return mydata
+ [/codeblock]
</description>
</method>
<method name="get_end" qualifiers="const">
@@ -485,6 +517,28 @@
<argument index="0" name="target" type="Control">
</argument>
<description>
+ Forwards the handling of this control's drag and drop to [code]target[/code] control.
+ Forwarding can be implemented in the target control similar to the methods [method get_drag_data], [method can_drop_data], and [method drop_data] but with two differences:
+ 1. The function name must be suffixed with [b]_fw[/b]
+ 2. The function must take an extra argument that is the control doing the forwarding
+ [codeblock]
+ # ThisControl.gd
+ extends Control
+ func _ready():
+ set_drag_forwarding(target_control)
+
+ # TargetControl.gd
+ extends Control
+ func can_drop_data_fw(position, data, from_control):
+ return true
+
+ func drop_data_fw(position, data, from_control):
+ my_handle_data(data)
+
+ func get_drag_data_fw(position, from_control):
+ set_drag_preview(my_preview)
+ return my_data()
+ [/codeblock]
</description>
</method>
<method name="set_drag_preview">
@@ -493,6 +547,7 @@
<argument index="0" name="control" type="Control">
</argument>
<description>
+ Shows the given control at the mouse pointer. A good time to call this method is in [method get_drag_data].
</description>
</method>
<method name="set_end">
diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape.xml
index ac25fb8cb6..757b053ffe 100644
--- a/doc/classes/ConvexPolygonShape.xml
+++ b/doc/classes/ConvexPolygonShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConvexPolygonShape" inherits="Shape" category="Core" version="3.1-dev">
+<class name="ConvexPolygonShape" inherits="Shape" category="Core" version="3.1">
<brief_description>
Convex polygon shape for 3D physics.
</brief_description>
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index 3da9d28a8f..6b31149c2f 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConvexPolygonShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
+<class name="ConvexPolygonShape2D" inherits="Shape2D" category="Core" version="3.1">
<brief_description>
Convex Polygon Shape for 2D physics.
</brief_description>
diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml
index edc4a165fc..ac5359738e 100644
--- a/doc/classes/CubeMap.xml
+++ b/doc/classes/CubeMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CubeMap" inherits="Resource" category="Core" version="3.1-dev">
+<class name="CubeMap" inherits="Resource" category="Core" version="3.1">
<brief_description>
A CubeMap is a 6 sided 3D texture.
</brief_description>
diff --git a/doc/classes/CubeMesh.xml b/doc/classes/CubeMesh.xml
index e26e73e861..cef412bbde 100644
--- a/doc/classes/CubeMesh.xml
+++ b/doc/classes/CubeMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CubeMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
+<class name="CubeMesh" inherits="PrimitiveMesh" category="Core" version="3.1">
<brief_description>
Generate an axis-aligned cuboid [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml
index a430041571..c7f2f7bb8d 100644
--- a/doc/classes/Curve.xml
+++ b/doc/classes/Curve.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Curve" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Curve" inherits="Resource" category="Core" version="3.1">
<brief_description>
A mathematic curve.
</brief_description>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index c53f07d406..03db9c2ea1 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Curve2D" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Curve2D" inherits="Resource" category="Core" version="3.1">
<brief_description>
Describes a Bezier curve in 2D space.
</brief_description>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index 1afa315465..f2308de12c 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Curve3D" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Curve3D" inherits="Resource" category="Core" version="3.1">
<brief_description>
Describes a Bezier curve in 3D space.
</brief_description>
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
index 67a21957ee..10e8a61f99 100644
--- a/doc/classes/CurveTexture.xml
+++ b/doc/classes/CurveTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CurveTexture" inherits="Texture" category="Core" version="3.1-dev">
+<class name="CurveTexture" inherits="Texture" category="Core" version="3.1">
<brief_description>
A texture that shows a curve.
</brief_description>
diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml
index 997180a17c..623830371a 100644
--- a/doc/classes/CylinderMesh.xml
+++ b/doc/classes/CylinderMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CylinderMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
+<class name="CylinderMesh" inherits="PrimitiveMesh" category="Core" version="3.1">
<brief_description>
Class representing a cylindrical [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml
index 55c6914c01..12e29cec32 100644
--- a/doc/classes/DampedSpringJoint2D.xml
+++ b/doc/classes/DampedSpringJoint2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DampedSpringJoint2D" inherits="Joint2D" category="Core" version="3.1-dev">
+<class name="DampedSpringJoint2D" inherits="Joint2D" category="Core" version="3.1">
<brief_description>
Damped spring constraint for 2D physics.
</brief_description>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index c63e440a57..d7118265f1 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Dictionary" category="Built-In Types" version="3.1-dev">
+<class name="Dictionary" category="Built-In Types" version="3.1">
<brief_description>
Dictionary type.
</brief_description>
diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml
index d777018ec9..5e492b74da 100644
--- a/doc/classes/DirectionalLight.xml
+++ b/doc/classes/DirectionalLight.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DirectionalLight" inherits="Light" category="Core" version="3.1-dev">
+<class name="DirectionalLight" inherits="Light" category="Core" version="3.1">
<brief_description>
Directional Light, such as the Sun or the Moon.
</brief_description>
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index 01590344cf..040ccf4462 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Directory" inherits="Reference" category="Core" version="3.1-dev">
+<class name="Directory" inherits="Reference" category="Core" version="3.1">
<brief_description>
Type used to handle the filesystem.
</brief_description>
diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml
index a56a08e7f6..03752c6e89 100644
--- a/doc/classes/DynamicFont.xml
+++ b/doc/classes/DynamicFont.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DynamicFont" inherits="Font" category="Core" version="3.1-dev">
+<class name="DynamicFont" inherits="Font" category="Core" version="3.1">
<brief_description>
DynamicFont renders vector font files at runtime.
</brief_description>
diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml
index 6113b0616b..510f19dd78 100644
--- a/doc/classes/DynamicFontData.xml
+++ b/doc/classes/DynamicFontData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DynamicFontData" inherits="Resource" category="Core" version="3.1-dev">
+<class name="DynamicFontData" inherits="Resource" category="Core" version="3.1">
<brief_description>
Used with [DynamicFont] to describe the location of a font file.
</brief_description>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index 68999c2ae4..a6b72d08ff 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorExportPlugin" inherits="Reference" category="Core" version="3.1-dev">
+<class name="EditorExportPlugin" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index da1dbb9327..fed9e264db 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFileDialog" inherits="ConfirmationDialog" category="Core" version="3.1-dev">
+<class name="EditorFileDialog" inherits="ConfirmationDialog" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml
index f5a3bf7eca..347acce2dd 100644
--- a/doc/classes/EditorFileSystem.xml
+++ b/doc/classes/EditorFileSystem.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFileSystem" inherits="Node" category="Core" version="3.1-dev">
+<class name="EditorFileSystem" inherits="Node" category="Core" version="3.1">
<brief_description>
Resource filesystem, as the editor sees it.
</brief_description>
diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml
index 295a4d094f..f5d0471037 100644
--- a/doc/classes/EditorFileSystemDirectory.xml
+++ b/doc/classes/EditorFileSystemDirectory.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFileSystemDirectory" inherits="Object" category="Core" version="3.1-dev">
+<class name="EditorFileSystemDirectory" inherits="Object" category="Core" version="3.1">
<brief_description>
A diretory for the resource filesystem.
</brief_description>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index fa22691a83..406bd7b7df 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorImportPlugin" inherits="Reference" category="Core" version="3.1-dev">
+<class name="EditorImportPlugin" inherits="Reference" category="Core" version="3.1">
<brief_description>
Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type.
</brief_description>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 0731c332ad..006a7ca690 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorInterface" inherits="Node" category="Core" version="3.1-dev">
+<class name="EditorInterface" inherits="Node" category="Core" version="3.1">
<brief_description>
Editor interface and main components.
</brief_description>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index d0ba6c2ce0..0a8d95d25d 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorPlugin" inherits="Node" category="Core" version="3.1-dev">
+<class name="EditorPlugin" inherits="Node" category="Core" version="3.1">
<brief_description>
Used by the editor to extend its functionality.
</brief_description>
diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml
index 240d82d5d2..ad0b7b0586 100644
--- a/doc/classes/EditorResourceConversionPlugin.xml
+++ b/doc/classes/EditorResourceConversionPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourceConversionPlugin" inherits="Reference" category="Core" version="3.1-dev">
+<class name="EditorResourceConversionPlugin" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml
index 6ec7f8a088..3b3e8a8369 100644
--- a/doc/classes/EditorResourcePreview.xml
+++ b/doc/classes/EditorResourcePreview.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourcePreview" inherits="Node" category="Core" version="3.1-dev">
+<class name="EditorResourcePreview" inherits="Node" category="Core" version="3.1">
<brief_description>
Helper to generate previews of resources or files.
</brief_description>
diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml
index 80aa185bb6..fb9af47b1f 100644
--- a/doc/classes/EditorResourcePreviewGenerator.xml
+++ b/doc/classes/EditorResourcePreviewGenerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourcePreviewGenerator" inherits="Reference" category="Core" version="3.1-dev">
+<class name="EditorResourcePreviewGenerator" inherits="Reference" category="Core" version="3.1">
<brief_description>
Custom generator of previews.
</brief_description>
diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml
index 340ea30ad0..6394dfdfe9 100644
--- a/doc/classes/EditorSceneImporter.xml
+++ b/doc/classes/EditorSceneImporter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporter" inherits="Reference" category="Core" version="3.1-dev">
+<class name="EditorSceneImporter" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index 8e7c79db84..664ea33dd6 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScenePostImport" inherits="Reference" category="Core" version="3.1-dev">
+<class name="EditorScenePostImport" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index fa7a74460f..1c22095b37 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScript" inherits="Reference" category="Core" version="3.1-dev">
+<class name="EditorScript" inherits="Reference" category="Core" version="3.1">
<brief_description>
Base script that can be used to add extension functions to the editor.
</brief_description>
diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml
index 325fae0fe9..4edd8583a0 100644
--- a/doc/classes/EditorSelection.xml
+++ b/doc/classes/EditorSelection.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSelection" inherits="Object" category="Core" version="3.1-dev">
+<class name="EditorSelection" inherits="Object" category="Core" version="3.1">
<brief_description>
Manages the SceneTree selection in the editor.
</brief_description>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index ef50c34792..cdd9560eda 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSettings" inherits="Resource" category="Core" version="3.1-dev">
+<class name="EditorSettings" inherits="Resource" category="Core" version="3.1">
<brief_description>
Object that holds the project-independent editor settings.
</brief_description>
diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml
index 3895f8a2e7..58d2671968 100644
--- a/doc/classes/EditorSpatialGizmo.xml
+++ b/doc/classes/EditorSpatialGizmo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSpatialGizmo" inherits="SpatialGizmo" category="Core" version="3.1-dev">
+<class name="EditorSpatialGizmo" inherits="SpatialGizmo" category="Core" version="3.1">
<brief_description>
Custom gizmo for editing Spatial objects.
</brief_description>
diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml
index 5b1b370fe0..8e6a117ea2 100644
--- a/doc/classes/EncodedObjectAsID.xml
+++ b/doc/classes/EncodedObjectAsID.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EncodedObjectAsID" inherits="Reference" category="Core" version="3.1-dev">
+<class name="EncodedObjectAsID" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index d4fb66540b..ea3c404346 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Engine" inherits="Object" category="Core" version="3.1-dev">
+<class name="Engine" inherits="Object" category="Core" version="3.1">
<brief_description>
Access to basic engine properties.
</brief_description>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index db87720e30..048c90e515 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Environment" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Environment" inherits="Resource" category="Core" version="3.1">
<brief_description>
Resource for environment nodes (like [WorldEnvironment]) that define multiple rendering options.
</brief_description>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 4074c236eb..3cafb6ba3b 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="File" inherits="Reference" category="Core" version="3.1-dev">
+<class name="File" inherits="Reference" category="Core" version="3.1">
<brief_description>
Type to handle file reading and writing operations.
</brief_description>
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index 50deecee72..b165d8fb8c 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FileDialog" inherits="ConfirmationDialog" category="Core" version="3.1-dev">
+<class name="FileDialog" inherits="ConfirmationDialog" category="Core" version="3.1">
<brief_description>
Dialog for selecting files or directories in the filesystem.
</brief_description>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index a6ab2e3a77..376d234ec3 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Font" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Font" inherits="Resource" category="Core" version="3.1">
<brief_description>
Internationalized font and text drawing support.
</brief_description>
diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml
index ff37408dcd..02b9dcfd88 100644
--- a/doc/classes/FuncRef.xml
+++ b/doc/classes/FuncRef.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FuncRef" inherits="Reference" category="Core" version="3.1-dev">
+<class name="FuncRef" inherits="Reference" category="Core" version="3.1">
<brief_description>
Reference to a function in an object.
</brief_description>
diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml
index ffe01c37af..fde91d09ac 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/GIProbe.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GIProbe" inherits="VisualInstance" category="Core" version="3.1-dev">
+<class name="GIProbe" inherits="VisualInstance" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml
index 97193600aa..b2186d7647 100644
--- a/doc/classes/GIProbeData.xml
+++ b/doc/classes/GIProbeData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GIProbeData" inherits="Resource" category="Core" version="3.1-dev">
+<class name="GIProbeData" inherits="Resource" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint.xml
index ffcc6e2a0c..f49f4231ef 100644
--- a/doc/classes/Generic6DOFJoint.xml
+++ b/doc/classes/Generic6DOFJoint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Generic6DOFJoint" inherits="Joint" category="Core" version="3.1-dev">
+<class name="Generic6DOFJoint" inherits="Joint" category="Core" version="3.1">
<brief_description>
The generic 6 degrees of freedom joint can implement a variety of joint-types by locking certain axes' rotation or translation.
</brief_description>
diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml
index ad30829b5d..7b25f87b19 100644
--- a/doc/classes/Geometry.xml
+++ b/doc/classes/Geometry.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Geometry" inherits="Object" category="Core" version="3.1-dev">
+<class name="Geometry" inherits="Object" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml
index 3575754d51..aea1882dae 100644
--- a/doc/classes/GeometryInstance.xml
+++ b/doc/classes/GeometryInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GeometryInstance" inherits="VisualInstance" category="Core" version="3.1-dev">
+<class name="GeometryInstance" inherits="VisualInstance" category="Core" version="3.1">
<brief_description>
Base node for geometry based visual instances.
</brief_description>
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index 2a7e6e1de2..df4a507b65 100644
--- a/doc/classes/Gradient.xml
+++ b/doc/classes/Gradient.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Gradient" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Gradient" inherits="Resource" category="Core" version="3.1">
<brief_description>
Color interpolator node.
</brief_description>
diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml
index 483dee92b6..9d2465e23d 100644
--- a/doc/classes/GradientTexture.xml
+++ b/doc/classes/GradientTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GradientTexture" inherits="Texture" category="Core" version="3.1-dev">
+<class name="GradientTexture" inherits="Texture" category="Core" version="3.1">
<brief_description>
Gradient filled texture.
</brief_description>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index dde00f85da..5fb12612ab 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GraphEdit" inherits="Control" category="Core" version="3.1-dev">
+<class name="GraphEdit" inherits="Control" category="Core" version="3.1">
<brief_description>
GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
</brief_description>
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index 6b581771e0..4c39720d69 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GraphNode" inherits="Container" category="Core" version="3.1-dev">
+<class name="GraphNode" inherits="Container" category="Core" version="3.1">
<brief_description>
A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
</brief_description>
diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml
index 414b7c27e7..7f70a8b7b4 100644
--- a/doc/classes/GridContainer.xml
+++ b/doc/classes/GridContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GridContainer" inherits="Container" category="Core" version="3.1-dev">
+<class name="GridContainer" inherits="Container" category="Core" version="3.1">
<brief_description>
Grid container used to arrange elements in a grid like layout
</brief_description>
diff --git a/doc/classes/GrooveJoint2D.xml b/doc/classes/GrooveJoint2D.xml
index 30497d243e..a15c658f78 100644
--- a/doc/classes/GrooveJoint2D.xml
+++ b/doc/classes/GrooveJoint2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GrooveJoint2D" inherits="Joint2D" category="Core" version="3.1-dev">
+<class name="GrooveJoint2D" inherits="Joint2D" category="Core" version="3.1">
<brief_description>
Groove constraint for 2D physics.
</brief_description>
diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml
index 7c73583d58..9c86f17ef1 100644
--- a/doc/classes/HBoxContainer.xml
+++ b/doc/classes/HBoxContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HBoxContainer" inherits="BoxContainer" category="Core" version="3.1-dev">
+<class name="HBoxContainer" inherits="BoxContainer" category="Core" version="3.1">
<brief_description>
Horizontal box container.
</brief_description>
diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml
index 20edc86747..61759c4f94 100644
--- a/doc/classes/HScrollBar.xml
+++ b/doc/classes/HScrollBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HScrollBar" inherits="ScrollBar" category="Core" version="3.1-dev">
+<class name="HScrollBar" inherits="ScrollBar" category="Core" version="3.1">
<brief_description>
Horizontal scroll bar.
</brief_description>
diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml
index e410aa4d86..1a9cf25857 100644
--- a/doc/classes/HSeparator.xml
+++ b/doc/classes/HSeparator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HSeparator" inherits="Separator" category="Core" version="3.1-dev">
+<class name="HSeparator" inherits="Separator" category="Core" version="3.1">
<brief_description>
Horizontal separator.
</brief_description>
diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml
index 70070d612b..6d5acded3c 100644
--- a/doc/classes/HSlider.xml
+++ b/doc/classes/HSlider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HSlider" inherits="Slider" category="Core" version="3.1-dev">
+<class name="HSlider" inherits="Slider" category="Core" version="3.1">
<brief_description>
Horizontal slider.
</brief_description>
diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml
index 7adf7d9d19..45b99c85a6 100644
--- a/doc/classes/HSplitContainer.xml
+++ b/doc/classes/HSplitContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HSplitContainer" inherits="SplitContainer" category="Core" version="3.1-dev">
+<class name="HSplitContainer" inherits="SplitContainer" category="Core" version="3.1">
<brief_description>
Horizontal split container.
</brief_description>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 2dcfb6c7d9..5bd7c4cd3e 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HTTPClient" inherits="Reference" category="Core" version="3.1-dev">
+<class name="HTTPClient" inherits="Reference" category="Core" version="3.1">
<brief_description>
Hyper-text transfer protocol client.
</brief_description>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index a6fd229ac9..010ef6d9d5 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HTTPRequest" inherits="Node" category="Core" version="3.1-dev">
+<class name="HTTPRequest" inherits="Node" category="Core" version="3.1">
<brief_description>
A node with the ability to send HTTP requests.
</brief_description>
diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint.xml
index 01e88f1de6..3c5719056b 100644
--- a/doc/classes/HingeJoint.xml
+++ b/doc/classes/HingeJoint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HingeJoint" inherits="Joint" category="Core" version="3.1-dev">
+<class name="HingeJoint" inherits="Joint" category="Core" version="3.1">
<brief_description>
A hinge between two 3D bodies.
</brief_description>
diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml
index c8f2d3970b..bcb15e44fc 100644
--- a/doc/classes/IP.xml
+++ b/doc/classes/IP.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="IP" inherits="Object" category="Core" version="3.1-dev">
+<class name="IP" inherits="Object" category="Core" version="3.1">
<brief_description>
Internet protocol (IP) support functions like DNS resolution.
</brief_description>
diff --git a/doc/classes/IP_Unix.xml b/doc/classes/IP_Unix.xml
index 7360067ecf..0dd4455562 100644
--- a/doc/classes/IP_Unix.xml
+++ b/doc/classes/IP_Unix.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="IP_Unix" inherits="IP" category="Core" version="3.1-dev">
+<class name="IP_Unix" inherits="IP" category="Core" version="3.1">
<brief_description>
Unix IP support. See [IP].
</brief_description>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index c4e0d55010..b158154c49 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Image" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Image" inherits="Resource" category="Core" version="3.1">
<brief_description>
Image datatype.
</brief_description>
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index f7f211861d..9a5937299c 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImageTexture" inherits="Texture" category="Core" version="3.1-dev">
+<class name="ImageTexture" inherits="Texture" category="Core" version="3.1">
<brief_description>
A [Texture] based on an [Image].
</brief_description>
diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml
index 1cb86bc07f..29d05bf877 100644
--- a/doc/classes/ImmediateGeometry.xml
+++ b/doc/classes/ImmediateGeometry.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.1-dev">
+<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.1">
<brief_description>
Draws simple geometry from code.
</brief_description>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 6ec6f08804..a7a6c2ef45 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Input" inherits="Object" category="Core" version="3.1-dev">
+<class name="Input" inherits="Object" category="Core" version="3.1">
<brief_description>
A Singleton that deals with inputs.
</brief_description>
diff --git a/doc/classes/InputDefault.xml b/doc/classes/InputDefault.xml
index b82904c023..27bfff2e67 100644
--- a/doc/classes/InputDefault.xml
+++ b/doc/classes/InputDefault.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputDefault" inherits="Input" category="Core" version="3.1-dev">
+<class name="InputDefault" inherits="Input" category="Core" version="3.1">
<brief_description>
Default implementation of the [Input] class.
</brief_description>
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 41defdcb7f..b30b144614 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEvent" inherits="Resource" category="Core" version="3.1-dev">
+<class name="InputEvent" inherits="Resource" category="Core" version="3.1">
<brief_description>
Generic input event
</brief_description>
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index f0c6cf59be..e50c43c045 100644
--- a/doc/classes/InputEventAction.xml
+++ b/doc/classes/InputEventAction.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventAction" inherits="InputEvent" category="Core" version="3.1-dev">
+<class name="InputEventAction" inherits="InputEvent" category="Core" version="3.1">
<brief_description>
Input event type for actions.
</brief_description>
diff --git a/doc/classes/InputEventGesture.xml b/doc/classes/InputEventGesture.xml
index 20410a8d5e..eb1e613b7c 100644
--- a/doc/classes/InputEventGesture.xml
+++ b/doc/classes/InputEventGesture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventGesture" inherits="InputEventWithModifiers" category="Core" version="3.1-dev">
+<class name="InputEventGesture" inherits="InputEventWithModifiers" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml
index 2c7c41d9e0..fdfdc10460 100644
--- a/doc/classes/InputEventJoypadButton.xml
+++ b/doc/classes/InputEventJoypadButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventJoypadButton" inherits="InputEvent" category="Core" version="3.1-dev">
+<class name="InputEventJoypadButton" inherits="InputEvent" category="Core" version="3.1">
<brief_description>
Input event for gamepad buttons.
</brief_description>
diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml
index cdcab3fcab..001dce9a03 100644
--- a/doc/classes/InputEventJoypadMotion.xml
+++ b/doc/classes/InputEventJoypadMotion.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventJoypadMotion" inherits="InputEvent" category="Core" version="3.1-dev">
+<class name="InputEventJoypadMotion" inherits="InputEvent" category="Core" version="3.1">
<brief_description>
Input event type for gamepad joysticks and other motions. For buttons see [code]InputEventJoypadButton[/code].
</brief_description>
diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml
index 1cd00e1042..dada5034f5 100644
--- a/doc/classes/InputEventKey.xml
+++ b/doc/classes/InputEventKey.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventKey" inherits="InputEventWithModifiers" category="Core" version="3.1-dev">
+<class name="InputEventKey" inherits="InputEventWithModifiers" category="Core" version="3.1">
<brief_description>
Input event type for keyboard events.
</brief_description>
diff --git a/doc/classes/InputEventMagnifyGesture.xml b/doc/classes/InputEventMagnifyGesture.xml
index 06beaa84f9..e9a0149c56 100644
--- a/doc/classes/InputEventMagnifyGesture.xml
+++ b/doc/classes/InputEventMagnifyGesture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMagnifyGesture" inherits="InputEventGesture" category="Core" version="3.1-dev">
+<class name="InputEventMagnifyGesture" inherits="InputEventGesture" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml
index 5d50d32d44..96a0116c3c 100644
--- a/doc/classes/InputEventMouse.xml
+++ b/doc/classes/InputEventMouse.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMouse" inherits="InputEventWithModifiers" category="Core" version="3.1-dev">
+<class name="InputEventMouse" inherits="InputEventWithModifiers" category="Core" version="3.1">
<brief_description>
Base input event type for mouse events.
</brief_description>
diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml
index bbdd2aff4e..73190c7283 100644
--- a/doc/classes/InputEventMouseButton.xml
+++ b/doc/classes/InputEventMouseButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMouseButton" inherits="InputEventMouse" category="Core" version="3.1-dev">
+<class name="InputEventMouseButton" inherits="InputEventMouse" category="Core" version="3.1">
<brief_description>
Input event type for mouse button events.
</brief_description>
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 96160dc699..83aa28c693 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMouseMotion" inherits="InputEventMouse" category="Core" version="3.1-dev">
+<class name="InputEventMouseMotion" inherits="InputEventMouse" category="Core" version="3.1">
<brief_description>
Input event type for mouse motion events.
</brief_description>
diff --git a/doc/classes/InputEventPanGesture.xml b/doc/classes/InputEventPanGesture.xml
index 06edf36d06..063986ae65 100644
--- a/doc/classes/InputEventPanGesture.xml
+++ b/doc/classes/InputEventPanGesture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventPanGesture" inherits="InputEventGesture" category="Core" version="3.1-dev">
+<class name="InputEventPanGesture" inherits="InputEventGesture" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml
index fd7ec15acc..a2ac8d587f 100644
--- a/doc/classes/InputEventScreenDrag.xml
+++ b/doc/classes/InputEventScreenDrag.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventScreenDrag" inherits="InputEvent" category="Core" version="3.1-dev">
+<class name="InputEventScreenDrag" inherits="InputEvent" category="Core" version="3.1">
<brief_description>
Input event type for screen drag events.
(only available on mobile devices)
diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml
index 019332ec26..64b9550f9d 100644
--- a/doc/classes/InputEventScreenTouch.xml
+++ b/doc/classes/InputEventScreenTouch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventScreenTouch" inherits="InputEvent" category="Core" version="3.1-dev">
+<class name="InputEventScreenTouch" inherits="InputEvent" category="Core" version="3.1">
<brief_description>
Input event type for screen touch events.
(only available on mobile devices)
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
index a31df65ffb..2d046cbfd2 100644
--- a/doc/classes/InputEventWithModifiers.xml
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventWithModifiers" inherits="InputEvent" category="Core" version="3.1-dev">
+<class name="InputEventWithModifiers" inherits="InputEvent" category="Core" version="3.1">
<brief_description>
Base class for keys events with modifiers.
</brief_description>
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index c5326c6211..eeb225d445 100644
--- a/doc/classes/InputMap.xml
+++ b/doc/classes/InputMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputMap" inherits="Object" category="Core" version="3.1-dev">
+<class name="InputMap" inherits="Object" category="Core" version="3.1">
<brief_description>
Singleton that manages [InputEventAction].
</brief_description>
diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml
index 834ad7bb11..249c6921c4 100644
--- a/doc/classes/InstancePlaceholder.xml
+++ b/doc/classes/InstancePlaceholder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InstancePlaceholder" inherits="Node" category="Core" version="3.1-dev">
+<class name="InstancePlaceholder" inherits="Node" category="Core" version="3.1">
<brief_description>
Placeholder for the root [Node] of a [PackedScene].
</brief_description>
diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml
index 19252ca5a8..9ee06b9d4f 100644
--- a/doc/classes/InterpolatedCamera.xml
+++ b/doc/classes/InterpolatedCamera.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InterpolatedCamera" inherits="Camera" category="Core" version="3.1-dev">
+<class name="InterpolatedCamera" inherits="Camera" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 95812ab299..e4db5aeb84 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ItemList" inherits="Control" category="Core" version="3.1-dev">
+<class name="ItemList" inherits="Control" category="Core" version="3.1">
<brief_description>
Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns.
</brief_description>
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index d3c2e7bb2f..fbf9aea7f9 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSON" inherits="Object" category="Core" version="3.1-dev">
+<class name="JSON" inherits="Object" category="Core" version="3.1">
<brief_description>
Helper class for parsing JSON data.
</brief_description>
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
index 4f9cdc976d..a9162e2d95 100644
--- a/doc/classes/JSONParseResult.xml
+++ b/doc/classes/JSONParseResult.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSONParseResult" inherits="Reference" category="Core" version="3.1-dev">
+<class name="JSONParseResult" inherits="Reference" category="Core" version="3.1">
<brief_description>
Data class wrapper for decoded JSON.
</brief_description>
diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml
index 4f37d75038..1d40b990a9 100644
--- a/doc/classes/JavaScript.xml
+++ b/doc/classes/JavaScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JavaScript" inherits="Object" category="Core" version="3.1-dev">
+<class name="JavaScript" inherits="Object" category="Core" version="3.1">
<brief_description>
Singleton that connects the engine with the browser's JavaScript context in HTML5 export.
</brief_description>
diff --git a/doc/classes/Joint.xml b/doc/classes/Joint.xml
index bb7ac74556..8cafdbdbf3 100644
--- a/doc/classes/Joint.xml
+++ b/doc/classes/Joint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Joint" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="Joint" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Base class for all 3D joints
</brief_description>
diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml
index a005e7994a..8247997927 100644
--- a/doc/classes/Joint2D.xml
+++ b/doc/classes/Joint2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Joint2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="Joint2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Base node for all joint constraints in 2D physics.
</brief_description>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index 7a20331115..5553602db2 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicBody" inherits="PhysicsBody" category="Core" version="3.1-dev">
+<class name="KinematicBody" inherits="PhysicsBody" category="Core" version="3.1">
<brief_description>
Kinematic body 3D node.
</brief_description>
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index df4b719eae..0448707c2e 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicBody2D" inherits="PhysicsBody2D" category="Core" version="3.1-dev">
+<class name="KinematicBody2D" inherits="PhysicsBody2D" category="Core" version="3.1">
<brief_description>
Kinematic body 2D node.
</brief_description>
diff --git a/doc/classes/KinematicCollision.xml b/doc/classes/KinematicCollision.xml
index 29025910f8..87eb9e77b5 100644
--- a/doc/classes/KinematicCollision.xml
+++ b/doc/classes/KinematicCollision.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicCollision" inherits="Reference" category="Core" version="3.1-dev">
+<class name="KinematicCollision" inherits="Reference" category="Core" version="3.1">
<brief_description>
Collision data for KinematicBody collisions.
</brief_description>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
index b133703c65..e403ada0b9 100644
--- a/doc/classes/KinematicCollision2D.xml
+++ b/doc/classes/KinematicCollision2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicCollision2D" inherits="Reference" category="Core" version="3.1-dev">
+<class name="KinematicCollision2D" inherits="Reference" category="Core" version="3.1">
<brief_description>
Collision data for KinematicBody2D collisions.
</brief_description>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 7dd07c0c8e..24c28fc810 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Label" inherits="Control" category="Core" version="3.1-dev">
+<class name="Label" inherits="Control" category="Core" version="3.1">
<brief_description>
Displays plain text in a line or wrapped inside a rectangle. For formatted text, use [RichTextLabel].
</brief_description>
diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml
index f09f2aa82c..763b38f49e 100644
--- a/doc/classes/LargeTexture.xml
+++ b/doc/classes/LargeTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LargeTexture" inherits="Texture" category="Core" version="3.1-dev">
+<class name="LargeTexture" inherits="Texture" category="Core" version="3.1">
<brief_description>
A Texture capable of storing many smaller Textures with offsets.
</brief_description>
diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml
index b99908256c..e05ed2d0b1 100644
--- a/doc/classes/Light.xml
+++ b/doc/classes/Light.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Light" inherits="VisualInstance" category="Core" version="3.1-dev">
+<class name="Light" inherits="VisualInstance" category="Core" version="3.1">
<brief_description>
Provides a base class for different kinds of light nodes.
</brief_description>
diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml
index b12cecacfc..f3903ffeae 100644
--- a/doc/classes/Light2D.xml
+++ b/doc/classes/Light2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Light2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="Light2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Casts light in a 2D environment.
</brief_description>
diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml
index becfdd2ff2..38b9054411 100644
--- a/doc/classes/LightOccluder2D.xml
+++ b/doc/classes/LightOccluder2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LightOccluder2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="LightOccluder2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Occludes light cast by a Light2D, casting shadows.
</brief_description>
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index 89f43fc95d..19be34978d 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Line2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="Line2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
A 2D line.
</brief_description>
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index fa65180d89..b6adf84abd 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LineEdit" inherits="Control" category="Core" version="3.1-dev">
+<class name="LineEdit" inherits="Control" category="Core" version="3.1">
<brief_description>
Control that provides single line string editing.
</brief_description>
diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml
index 8ff3c71a9c..4a5486583a 100644
--- a/doc/classes/LineShape2D.xml
+++ b/doc/classes/LineShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LineShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
+<class name="LineShape2D" inherits="Shape2D" category="Core" version="3.1">
<brief_description>
Line shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index b3a5f3fd7c..f419802958 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LinkButton" inherits="BaseButton" category="Core" version="3.1-dev">
+<class name="LinkButton" inherits="BaseButton" category="Core" version="3.1">
<brief_description>
Simple button used to represent a link to some resource
</brief_description>
diff --git a/doc/classes/Listener.xml b/doc/classes/Listener.xml
index 0783c3ddba..720a7eafc5 100644
--- a/doc/classes/Listener.xml
+++ b/doc/classes/Listener.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Listener" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="Listener" inherits="Spatial" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index 214c2569e9..8c2aa01f81 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MainLoop" inherits="Object" category="Core" version="3.1-dev">
+<class name="MainLoop" inherits="Object" category="Core" version="3.1">
<brief_description>
Main loop is the abstract main loop base class.
</brief_description>
diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml
index 80554192a0..15613e4bec 100644
--- a/doc/classes/MarginContainer.xml
+++ b/doc/classes/MarginContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MarginContainer" inherits="Container" category="Core" version="3.1-dev">
+<class name="MarginContainer" inherits="Container" category="Core" version="3.1">
<brief_description>
Simple margin container.
</brief_description>
diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml
index 44ff094971..687f81eec7 100644
--- a/doc/classes/Marshalls.xml
+++ b/doc/classes/Marshalls.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Marshalls" inherits="Reference" category="Core" version="3.1-dev">
+<class name="Marshalls" inherits="Reference" category="Core" version="3.1">
<brief_description>
Data transformation (marshalling) and encoding helpers.
</brief_description>
diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml
index fa53ce11da..7420a5deb0 100644
--- a/doc/classes/Material.xml
+++ b/doc/classes/Material.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Material" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Material" inherits="Resource" category="Core" version="3.1">
<brief_description>
Abstract base [Resource] for coloring and shading geometry.
</brief_description>
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 333326b730..c9a8d3ce7a 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MenuButton" inherits="Button" category="Core" version="3.1-dev">
+<class name="MenuButton" inherits="Button" category="Core" version="3.1">
<brief_description>
Special button that brings up a [PopupMenu] when clicked.
</brief_description>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index 6e60809999..83cadf959c 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Mesh" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Mesh" inherits="Resource" category="Core" version="3.1">
<brief_description>
A [Resource] that contains vertex-array based geometry.
</brief_description>
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index eff6bd2c61..43d94004a8 100644
--- a/doc/classes/MeshDataTool.xml
+++ b/doc/classes/MeshDataTool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshDataTool" inherits="Reference" category="Core" version="3.1-dev">
+<class name="MeshDataTool" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml
index d70123239a..ef42726ca9 100644
--- a/doc/classes/MeshInstance.xml
+++ b/doc/classes/MeshInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshInstance" inherits="GeometryInstance" category="Core" version="3.1-dev">
+<class name="MeshInstance" inherits="GeometryInstance" category="Core" version="3.1">
<brief_description>
Node that instances meshes into a scenario.
</brief_description>
diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml
index 5e5af692fd..7f0136bf77 100644
--- a/doc/classes/MeshInstance2D.xml
+++ b/doc/classes/MeshInstance2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshInstance2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="MeshInstance2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index 40776d095a..3726524638 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshLibrary" inherits="Resource" category="Core" version="3.1-dev">
+<class name="MeshLibrary" inherits="Resource" category="Core" version="3.1">
<brief_description>
Library of meshes.
</brief_description>
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index f5bd0885d3..b78d82199c 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiMesh" inherits="Resource" category="Core" version="3.1-dev">
+<class name="MultiMesh" inherits="Resource" category="Core" version="3.1">
<brief_description>
Provides high performance mesh instancing.
</brief_description>
diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance.xml
index 0ffdb3c928..5e021dfe9b 100644
--- a/doc/classes/MultiMeshInstance.xml
+++ b/doc/classes/MultiMeshInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiMeshInstance" inherits="GeometryInstance" category="Core" version="3.1-dev">
+<class name="MultiMeshInstance" inherits="GeometryInstance" category="Core" version="3.1">
<brief_description>
Node that instances a [MultiMesh].
</brief_description>
diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml
index ce3a4cc45a..8f2751af98 100644
--- a/doc/classes/Mutex.xml
+++ b/doc/classes/Mutex.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Mutex" inherits="Reference" category="Core" version="3.1-dev">
+<class name="Mutex" inherits="Reference" category="Core" version="3.1">
<brief_description>
A synchronization Mutex.
</brief_description>
diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml
index e2be70979d..b3b9ada26c 100644
--- a/doc/classes/Navigation.xml
+++ b/doc/classes/Navigation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Navigation" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="Navigation" inherits="Spatial" category="Core" version="3.1">
<brief_description>
A collection of [code]NavigationMesh[/code] resources and methods used for pathfinding.
</brief_description>
diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml
index 4709dab3e8..6f9ff7a2be 100644
--- a/doc/classes/Navigation2D.xml
+++ b/doc/classes/Navigation2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Navigation2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="Navigation2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index 34ca1f852e..f0654e5b12 100644
--- a/doc/classes/NavigationMesh.xml
+++ b/doc/classes/NavigationMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationMesh" inherits="Resource" category="Core" version="3.1-dev">
+<class name="NavigationMesh" inherits="Resource" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationMeshInstance.xml b/doc/classes/NavigationMeshInstance.xml
index 48b7e3a8ef..643bfc726f 100644
--- a/doc/classes/NavigationMeshInstance.xml
+++ b/doc/classes/NavigationMeshInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationMeshInstance" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="NavigationMeshInstance" inherits="Spatial" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index b8865a24b3..b29e19e5d8 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationPolygon" inherits="Resource" category="Core" version="3.1-dev">
+<class name="NavigationPolygon" inherits="Resource" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationPolygonInstance.xml b/doc/classes/NavigationPolygonInstance.xml
index db9b691ef1..ff95f652f1 100644
--- a/doc/classes/NavigationPolygonInstance.xml
+++ b/doc/classes/NavigationPolygonInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationPolygonInstance" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="NavigationPolygonInstance" inherits="Node2D" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml
index 794886dd64..71614c5f76 100644
--- a/doc/classes/NetworkedMultiplayerPeer.xml
+++ b/doc/classes/NetworkedMultiplayerPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" category="Core" version="3.1-dev">
+<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" category="Core" version="3.1">
<brief_description>
A high-level network interface to simplify multiplayer interactions.
</brief_description>
diff --git a/doc/classes/Nil.xml b/doc/classes/Nil.xml
index 46c972d4d5..e09dba6511 100644
--- a/doc/classes/Nil.xml
+++ b/doc/classes/Nil.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Nil" category="Built-In Types" version="3.1-dev">
+<class name="Nil" category="Built-In Types" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index ce6fe26e07..f40b32951f 100644
--- a/doc/classes/NinePatchRect.xml
+++ b/doc/classes/NinePatchRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NinePatchRect" inherits="Control" category="Core" version="3.1-dev">
+<class name="NinePatchRect" inherits="Control" category="Core" version="3.1">
<brief_description>
Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes.
</brief_description>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index e272e14d08..8d07aa95f3 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Node" inherits="Object" category="Core" version="3.1-dev">
+<class name="Node" inherits="Object" category="Core" version="3.1">
<brief_description>
Base class for all [i]scene[/i] objects.
</brief_description>
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 0b462967a1..a61678041f 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Node2D" inherits="CanvasItem" category="Core" version="3.1-dev">
+<class name="Node2D" inherits="CanvasItem" category="Core" version="3.1">
<brief_description>
A 2D game object, parent of all 2D related nodes. Has a position, rotation, scale and Z-index.
</brief_description>
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 48effa5918..f589fa12b7 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NodePath" category="Built-In Types" version="3.1-dev">
+<class name="NodePath" category="Built-In Types" version="3.1">
<brief_description>
Pre-parsed scene tree path.
</brief_description>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 0b11070ec2..a98385f1d2 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OS" inherits="Object" category="Core" version="3.1-dev">
+<class name="OS" inherits="Object" category="Core" version="3.1">
<brief_description>
Operating System functions.
</brief_description>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 663eb2be56..b5986ec0f5 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Object" category="Core" version="3.1-dev">
+<class name="Object" category="Core" version="3.1">
<brief_description>
Base class for all non built-in types.
</brief_description>
diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml
index 9824c7868d..e8d6b54f27 100644
--- a/doc/classes/OccluderPolygon2D.xml
+++ b/doc/classes/OccluderPolygon2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OccluderPolygon2D" inherits="Resource" category="Core" version="3.1-dev">
+<class name="OccluderPolygon2D" inherits="Resource" category="Core" version="3.1">
<brief_description>
Defines a 2D polygon for LightOccluder2D.
</brief_description>
diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml
index 2fdcc86d55..0ed133f52e 100644
--- a/doc/classes/OmniLight.xml
+++ b/doc/classes/OmniLight.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OmniLight" inherits="Light" category="Core" version="3.1-dev">
+<class name="OmniLight" inherits="Light" category="Core" version="3.1">
<brief_description>
OmniDirectional Light, such as a light bulb or a candle.
</brief_description>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index cefb02d724..de6f60c384 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OptionButton" inherits="Button" category="Core" version="3.1-dev">
+<class name="OptionButton" inherits="Button" category="Core" version="3.1">
<brief_description>
Button control that provides selectable options when pressed.
</brief_description>
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index ed7a343f03..01985a9bb3 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PCKPacker" inherits="Reference" category="Core" version="3.1-dev">
+<class name="PCKPacker" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PHashTranslation.xml b/doc/classes/PHashTranslation.xml
index 52eb2748da..18c72a0576 100644
--- a/doc/classes/PHashTranslation.xml
+++ b/doc/classes/PHashTranslation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PHashTranslation" inherits="Translation" category="Core" version="3.1-dev">
+<class name="PHashTranslation" inherits="Translation" category="Core" version="3.1">
<brief_description>
Optimized translation.
</brief_description>
diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml
index edabaace8f..e6dbe57925 100644
--- a/doc/classes/PackedDataContainer.xml
+++ b/doc/classes/PackedDataContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedDataContainer" inherits="Resource" category="Core" version="3.1-dev">
+<class name="PackedDataContainer" inherits="Resource" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml
index 2f418991de..371fe5a5ac 100644
--- a/doc/classes/PackedDataContainerRef.xml
+++ b/doc/classes/PackedDataContainerRef.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedDataContainerRef" inherits="Reference" category="Core" version="3.1-dev">
+<class name="PackedDataContainerRef" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index b6ef9db068..cf89e6a2df 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedScene" inherits="Resource" category="Core" version="3.1-dev">
+<class name="PackedScene" inherits="Resource" category="Core" version="3.1">
<brief_description>
An abstraction of a serialized scene.
</brief_description>
diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml
index 6fdbaf27e6..a4cf0c8029 100644
--- a/doc/classes/PacketPeer.xml
+++ b/doc/classes/PacketPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeer" inherits="Reference" category="Core" version="3.1-dev">
+<class name="PacketPeer" inherits="Reference" category="Core" version="3.1">
<brief_description>
Abstraction and base class for packet-based protocols.
</brief_description>
diff --git a/doc/classes/PacketPeerStream.xml b/doc/classes/PacketPeerStream.xml
index 0ad473f644..9e3195bb44 100644
--- a/doc/classes/PacketPeerStream.xml
+++ b/doc/classes/PacketPeerStream.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeerStream" inherits="PacketPeer" category="Core" version="3.1-dev">
+<class name="PacketPeerStream" inherits="PacketPeer" category="Core" version="3.1">
<brief_description>
Wrapper to use a PacketPeer over a StreamPeer.
</brief_description>
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
index 29abcda9d9..1b821e06cf 100644
--- a/doc/classes/PacketPeerUDP.xml
+++ b/doc/classes/PacketPeerUDP.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeerUDP" inherits="PacketPeer" category="Core" version="3.1-dev">
+<class name="PacketPeerUDP" inherits="PacketPeer" category="Core" version="3.1">
<brief_description>
UDP packet peer.
</brief_description>
diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml
index 3afda37355..758925e969 100644
--- a/doc/classes/Panel.xml
+++ b/doc/classes/Panel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Panel" inherits="Control" category="Core" version="3.1-dev">
+<class name="Panel" inherits="Control" category="Core" version="3.1">
<brief_description>
Provides an opaque background for [Control] children.
</brief_description>
diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml
index 5b76f49687..f5c351fa21 100644
--- a/doc/classes/PanelContainer.xml
+++ b/doc/classes/PanelContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PanelContainer" inherits="Container" category="Core" version="3.1-dev">
+<class name="PanelContainer" inherits="Container" category="Core" version="3.1">
<brief_description>
Panel container type.
</brief_description>
diff --git a/doc/classes/PanoramaSky.xml b/doc/classes/PanoramaSky.xml
index 0196f7a73e..eb288d13be 100644
--- a/doc/classes/PanoramaSky.xml
+++ b/doc/classes/PanoramaSky.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PanoramaSky" inherits="Sky" category="Core" version="3.1-dev">
+<class name="PanoramaSky" inherits="Sky" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml
index c8b15b3c7d..2409b7a1c1 100644
--- a/doc/classes/ParallaxBackground.xml
+++ b/doc/classes/ParallaxBackground.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ParallaxBackground" inherits="CanvasLayer" category="Core" version="3.1-dev">
+<class name="ParallaxBackground" inherits="CanvasLayer" category="Core" version="3.1">
<brief_description>
A node used to create a parallax scrolling background.
</brief_description>
diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml
index b5d4e10d7e..662a15e043 100644
--- a/doc/classes/ParallaxLayer.xml
+++ b/doc/classes/ParallaxLayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ParallaxLayer" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="ParallaxLayer" inherits="Node2D" category="Core" version="3.1">
<brief_description>
A parallax scrolling layer to be used with [ParallaxBackground].
</brief_description>
diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml
index b56c15f246..04177aca25 100644
--- a/doc/classes/Particles.xml
+++ b/doc/classes/Particles.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Particles" inherits="GeometryInstance" category="Core" version="3.1-dev">
+<class name="Particles" inherits="GeometryInstance" category="Core" version="3.1">
<brief_description>
3D particle emitter.
</brief_description>
diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml
index 88a373b7a9..47265054b0 100644
--- a/doc/classes/Particles2D.xml
+++ b/doc/classes/Particles2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Particles2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="Particles2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
2D particle emitter.
</brief_description>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index a6c463d307..ca79089049 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ParticlesMaterial" inherits="Material" category="Core" version="3.1-dev">
+<class name="ParticlesMaterial" inherits="Material" category="Core" version="3.1">
<brief_description>
Particle properties for [Particles] and [Particles2D] nodes.
</brief_description>
diff --git a/doc/classes/Path.xml b/doc/classes/Path.xml
index 48d41c89c1..621a513da3 100644
--- a/doc/classes/Path.xml
+++ b/doc/classes/Path.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Path" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="Path" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Container for a [Curve3D].
</brief_description>
diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml
index dcef22c241..5e40fb6956 100644
--- a/doc/classes/Path2D.xml
+++ b/doc/classes/Path2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Path2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="Path2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Contains a [Curve2D] path for [PathFollow2D] nodes to follow.
</brief_description>
diff --git a/doc/classes/PathFollow.xml b/doc/classes/PathFollow.xml
index c248e6f868..650fed7ec6 100644
--- a/doc/classes/PathFollow.xml
+++ b/doc/classes/PathFollow.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PathFollow" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="PathFollow" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Point sampler for a [Path].
</brief_description>
diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml
index 995c65d4fa..f9940dab2f 100644
--- a/doc/classes/PathFollow2D.xml
+++ b/doc/classes/PathFollow2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PathFollow2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="PathFollow2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Point sampler for a [Path2D].
</brief_description>
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
index c67b9e2f07..de3a251a79 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Performance" inherits="Object" category="Core" version="3.1-dev">
+<class name="Performance" inherits="Object" category="Core" version="3.1">
<brief_description>
Exposes performance related data.
</brief_description>
diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/Physics2DDirectBodyState.xml
index d1634974f4..73a2d792ab 100644
--- a/doc/classes/Physics2DDirectBodyState.xml
+++ b/doc/classes/Physics2DDirectBodyState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DDirectBodyState" inherits="Object" category="Core" version="3.1-dev">
+<class name="Physics2DDirectBodyState" inherits="Object" category="Core" version="3.1">
<brief_description>
Direct access object to a physics body in the [Physics2DServer].
</brief_description>
diff --git a/doc/classes/Physics2DDirectBodyStateSW.xml b/doc/classes/Physics2DDirectBodyStateSW.xml
index 7d04e483ff..cb1e9239b3 100644
--- a/doc/classes/Physics2DDirectBodyStateSW.xml
+++ b/doc/classes/Physics2DDirectBodyStateSW.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DDirectBodyStateSW" inherits="Physics2DDirectBodyState" category="Core" version="3.1-dev">
+<class name="Physics2DDirectBodyStateSW" inherits="Physics2DDirectBodyState" category="Core" version="3.1">
<brief_description>
Software implementation of [Physics2DDirectBodyState].
</brief_description>
diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml
index b3a33e9216..b55702dac4 100644
--- a/doc/classes/Physics2DDirectSpaceState.xml
+++ b/doc/classes/Physics2DDirectSpaceState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DDirectSpaceState" inherits="Object" category="Core" version="3.1-dev">
+<class name="Physics2DDirectSpaceState" inherits="Object" category="Core" version="3.1">
<brief_description>
Direct access object to a space in the [Physics2DServer].
</brief_description>
diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml
index a97a198e4b..98535dd330 100644
--- a/doc/classes/Physics2DServer.xml
+++ b/doc/classes/Physics2DServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DServer" inherits="Object" category="Core" version="3.1-dev">
+<class name="Physics2DServer" inherits="Object" category="Core" version="3.1">
<brief_description>
Physics 2D Server.
</brief_description>
diff --git a/doc/classes/Physics2DServerSW.xml b/doc/classes/Physics2DServerSW.xml
index 25ca5dd4d2..49157bd94b 100644
--- a/doc/classes/Physics2DServerSW.xml
+++ b/doc/classes/Physics2DServerSW.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DServerSW" inherits="Physics2DServer" category="Core" version="3.1-dev">
+<class name="Physics2DServerSW" inherits="Physics2DServer" category="Core" version="3.1">
<brief_description>
Software implementation of [Physics2DServer].
</brief_description>
diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml
index 209623c62a..391ad6276f 100644
--- a/doc/classes/Physics2DShapeQueryParameters.xml
+++ b/doc/classes/Physics2DShapeQueryParameters.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DShapeQueryParameters" inherits="Reference" category="Core" version="3.1-dev">
+<class name="Physics2DShapeQueryParameters" inherits="Reference" category="Core" version="3.1">
<brief_description>
Parameters to be sent to a 2D shape physics query.
</brief_description>
diff --git a/doc/classes/Physics2DShapeQueryResult.xml b/doc/classes/Physics2DShapeQueryResult.xml
index 2e2180ee0f..52e7294e24 100644
--- a/doc/classes/Physics2DShapeQueryResult.xml
+++ b/doc/classes/Physics2DShapeQueryResult.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DShapeQueryResult" inherits="Reference" category="Core" version="3.1-dev">
+<class name="Physics2DShapeQueryResult" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Physics2DTestMotionResult.xml b/doc/classes/Physics2DTestMotionResult.xml
index 943ef72ffb..3b864433f0 100644
--- a/doc/classes/Physics2DTestMotionResult.xml
+++ b/doc/classes/Physics2DTestMotionResult.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DTestMotionResult" inherits="Reference" category="Core" version="3.1-dev">
+<class name="Physics2DTestMotionResult" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml
index b765bb1f1f..e252aaa048 100644
--- a/doc/classes/PhysicsBody.xml
+++ b/doc/classes/PhysicsBody.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsBody" inherits="CollisionObject" category="Core" version="3.1-dev">
+<class name="PhysicsBody" inherits="CollisionObject" category="Core" version="3.1">
<brief_description>
Base class for all objects affected by physics in 3D space.
</brief_description>
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index 80d72512fe..42b1eac5e4 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsBody2D" inherits="CollisionObject2D" category="Core" version="3.1-dev">
+<class name="PhysicsBody2D" inherits="CollisionObject2D" category="Core" version="3.1">
<brief_description>
Base class for all objects affected by physics in 2D space.
</brief_description>
diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml
index 1c92ea1cc4..74190d0780 100644
--- a/doc/classes/PhysicsDirectBodyState.xml
+++ b/doc/classes/PhysicsDirectBodyState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsDirectBodyState" inherits="Object" category="Core" version="3.1-dev">
+<class name="PhysicsDirectBodyState" inherits="Object" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
@@ -45,7 +45,7 @@
<description>
</description>
</method>
- <method name="apply_torqe_impulse">
+ <method name="apply_torque_impulse">
<return type="void">
</return>
<argument index="0" name="j" type="Vector3">
diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml
index e33718edf0..fabf153dac 100644
--- a/doc/classes/PhysicsDirectSpaceState.xml
+++ b/doc/classes/PhysicsDirectSpaceState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsDirectSpaceState" inherits="Object" category="Core" version="3.1-dev">
+<class name="PhysicsDirectSpaceState" inherits="Object" category="Core" version="3.1">
<brief_description>
Direct access object to a space in the [PhysicsServer].
</brief_description>
diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml
index 02172a310d..6c3a435360 100644
--- a/doc/classes/PhysicsServer.xml
+++ b/doc/classes/PhysicsServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsServer" inherits="Object" category="Core" version="3.1-dev">
+<class name="PhysicsServer" inherits="Object" category="Core" version="3.1">
<brief_description>
Server interface for low level physics access.
</brief_description>
diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml
index 6bd37dda32..2f36e81e27 100644
--- a/doc/classes/PhysicsShapeQueryParameters.xml
+++ b/doc/classes/PhysicsShapeQueryParameters.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core" version="3.1-dev">
+<class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PhysicsShapeQueryResult.xml b/doc/classes/PhysicsShapeQueryResult.xml
index bb78071e85..080d7389b7 100644
--- a/doc/classes/PhysicsShapeQueryResult.xml
+++ b/doc/classes/PhysicsShapeQueryResult.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryResult" inherits="Reference" category="Core" version="3.1-dev">
+<class name="PhysicsShapeQueryResult" inherits="Reference" category="Core" version="3.1">
<brief_description>
Result of a shape query in Physics2DServer.
</brief_description>
diff --git a/doc/classes/PinJoint.xml b/doc/classes/PinJoint.xml
index 7c94347008..470c22cd4c 100644
--- a/doc/classes/PinJoint.xml
+++ b/doc/classes/PinJoint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PinJoint" inherits="Joint" category="Core" version="3.1-dev">
+<class name="PinJoint" inherits="Joint" category="Core" version="3.1">
<brief_description>
Pin Joint for 3D Shapes.
</brief_description>
diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml
index 0982ffacae..42708151ec 100644
--- a/doc/classes/PinJoint2D.xml
+++ b/doc/classes/PinJoint2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PinJoint2D" inherits="Joint2D" category="Core" version="3.1-dev">
+<class name="PinJoint2D" inherits="Joint2D" category="Core" version="3.1">
<brief_description>
Pin Joint for 2D Shapes.
</brief_description>
<description>
- Pin Joint for 2D Rigid Bodies. It pins 2 bodies (rigid or static) together, or a single body to a fixed position in space.
+ Pin Joint for 2D Rigid Bodies. It pins two bodies (rigid or static) together.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index f478b2d384..157bf42239 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Plane" category="Built-In Types" version="3.1-dev">
+<class name="Plane" category="Built-In Types" version="3.1">
<brief_description>
Plane in hessian form.
</brief_description>
diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml
index 60bc1f6613..fc293ab4df 100644
--- a/doc/classes/PlaneMesh.xml
+++ b/doc/classes/PlaneMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PlaneMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
+<class name="PlaneMesh" inherits="PrimitiveMesh" category="Core" version="3.1">
<brief_description>
Class representing a planar [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/PlaneShape.xml b/doc/classes/PlaneShape.xml
index e0c1fdf25b..bc3faf7c01 100644
--- a/doc/classes/PlaneShape.xml
+++ b/doc/classes/PlaneShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PlaneShape" inherits="Shape" category="Core" version="3.1-dev">
+<class name="PlaneShape" inherits="Shape" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index a538cd2f05..429114a128 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Polygon2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="Polygon2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
A 2D polygon.
</brief_description>
@@ -31,6 +31,8 @@
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
The polygon's list of vertices. The final point will be connected to the first.
</member>
+ <member name="splits" type="PoolIntArray" setter="set_splits" getter="get_splits">
+ </member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
The polygon's fill texture. Use [code]uv[/code] to set texture coordinates.
</member>
diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml
index 3c57b4ca18..e4a4d9b976 100644
--- a/doc/classes/PolygonPathFinder.xml
+++ b/doc/classes/PolygonPathFinder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PolygonPathFinder" inherits="Resource" category="Core" version="3.1-dev">
+<class name="PolygonPathFinder" inherits="Resource" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml
index 7982c91ea9..0118e7477a 100644
--- a/doc/classes/PoolByteArray.xml
+++ b/doc/classes/PoolByteArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolByteArray" category="Built-In Types" version="3.1-dev">
+<class name="PoolByteArray" category="Built-In Types" version="3.1">
<brief_description>
Raw byte array.
</brief_description>
diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PoolColorArray.xml
index c61f39b238..0a4221728e 100644
--- a/doc/classes/PoolColorArray.xml
+++ b/doc/classes/PoolColorArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolColorArray" category="Built-In Types" version="3.1-dev">
+<class name="PoolColorArray" category="Built-In Types" version="3.1">
<brief_description>
Array of Colors
</brief_description>
diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PoolIntArray.xml
index 7b9bb96730..7709a69c84 100644
--- a/doc/classes/PoolIntArray.xml
+++ b/doc/classes/PoolIntArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolIntArray" category="Built-In Types" version="3.1-dev">
+<class name="PoolIntArray" category="Built-In Types" version="3.1">
<brief_description>
Integer Array.
</brief_description>
diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PoolRealArray.xml
index b0f971ae3e..19f31f7dfb 100644
--- a/doc/classes/PoolRealArray.xml
+++ b/doc/classes/PoolRealArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolRealArray" category="Built-In Types" version="3.1-dev">
+<class name="PoolRealArray" category="Built-In Types" version="3.1">
<brief_description>
Real Array.
</brief_description>
diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PoolStringArray.xml
index 9db0af34be..3d971d1ac9 100644
--- a/doc/classes/PoolStringArray.xml
+++ b/doc/classes/PoolStringArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolStringArray" category="Built-In Types" version="3.1-dev">
+<class name="PoolStringArray" category="Built-In Types" version="3.1">
<brief_description>
String Array.
</brief_description>
diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PoolVector2Array.xml
index 5c8599f220..14c226d019 100644
--- a/doc/classes/PoolVector2Array.xml
+++ b/doc/classes/PoolVector2Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolVector2Array" category="Built-In Types" version="3.1-dev">
+<class name="PoolVector2Array" category="Built-In Types" version="3.1">
<brief_description>
An Array of Vector2.
</brief_description>
diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PoolVector3Array.xml
index 944bb767e0..27ddfa10a5 100644
--- a/doc/classes/PoolVector3Array.xml
+++ b/doc/classes/PoolVector3Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolVector3Array" category="Built-In Types" version="3.1-dev">
+<class name="PoolVector3Array" category="Built-In Types" version="3.1">
<brief_description>
An Array of Vector3.
</brief_description>
diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml
index b6ee43254e..abf6ec3238 100644
--- a/doc/classes/Popup.xml
+++ b/doc/classes/Popup.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Popup" inherits="Control" category="Core" version="3.1-dev">
+<class name="Popup" inherits="Control" category="Core" version="3.1">
<brief_description>
Base container control for popups and dialogs.
</brief_description>
diff --git a/doc/classes/PopupDialog.xml b/doc/classes/PopupDialog.xml
index eac361f404..4f15fb4b05 100644
--- a/doc/classes/PopupDialog.xml
+++ b/doc/classes/PopupDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PopupDialog" inherits="Popup" category="Core" version="3.1-dev">
+<class name="PopupDialog" inherits="Popup" category="Core" version="3.1">
<brief_description>
Base class for Popup Dialogs.
</brief_description>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 62911c1cf7..70e6fab5b6 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PopupMenu" inherits="Popup" category="Core" version="3.1-dev">
+<class name="PopupMenu" inherits="Popup" category="Core" version="3.1">
<brief_description>
PopupMenu displays a list of options.
</brief_description>
diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml
index 5e8e24d36f..694c29efda 100644
--- a/doc/classes/PopupPanel.xml
+++ b/doc/classes/PopupPanel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PopupPanel" inherits="Popup" category="Core" version="3.1-dev">
+<class name="PopupPanel" inherits="Popup" category="Core" version="3.1">
<brief_description>
Class for displaying popups with a panel background.
</brief_description>
diff --git a/doc/classes/Position2D.xml b/doc/classes/Position2D.xml
index 3e29000c5b..6c26bf412c 100644
--- a/doc/classes/Position2D.xml
+++ b/doc/classes/Position2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Position2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="Position2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Generic 2D Position hint for editing.
</brief_description>
diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml
index 2719cdb7f3..de29ac2154 100644
--- a/doc/classes/Position3D.xml
+++ b/doc/classes/Position3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Position3D" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="Position3D" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Generic 3D Position hint for editing
</brief_description>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 8fd8e5da1e..c5bc3d6e47 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PrimitiveMesh" inherits="Mesh" category="Core" version="3.1-dev">
+<class name="PrimitiveMesh" inherits="Mesh" category="Core" version="3.1">
<brief_description>
Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
</brief_description>
diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml
index 58f7a0dd09..268395c37a 100644
--- a/doc/classes/PrismMesh.xml
+++ b/doc/classes/PrismMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PrismMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
+<class name="PrismMesh" inherits="PrimitiveMesh" category="Core" version="3.1">
<brief_description>
Class representing a prism-shaped [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/ProceduralSky.xml b/doc/classes/ProceduralSky.xml
index 75831465ed..11af73f953 100644
--- a/doc/classes/ProceduralSky.xml
+++ b/doc/classes/ProceduralSky.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProceduralSky" inherits="Sky" category="Core" version="3.1-dev">
+<class name="ProceduralSky" inherits="Sky" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index 44eb82f2a4..919ecd7c86 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProgressBar" inherits="Range" category="Core" version="3.1-dev">
+<class name="ProgressBar" inherits="Range" category="Core" version="3.1">
<brief_description>
General purpose progress bar.
</brief_description>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 83dea5d097..44bba8bd20 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProjectSettings" inherits="Object" category="Core" version="3.1-dev">
+<class name="ProjectSettings" inherits="Object" category="Core" version="3.1">
<brief_description>
Contains global variables accessible from everywhere.
</brief_description>
diff --git a/doc/classes/ProximityGroup.xml b/doc/classes/ProximityGroup.xml
index 697bb8ff7e..1f1c45fbf9 100644
--- a/doc/classes/ProximityGroup.xml
+++ b/doc/classes/ProximityGroup.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProximityGroup" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="ProximityGroup" inherits="Spatial" category="Core" version="3.1">
<brief_description>
General purpose proximity-detection node.
</brief_description>
diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml
index 2f50229643..69702ee22e 100644
--- a/doc/classes/ProxyTexture.xml
+++ b/doc/classes/ProxyTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProxyTexture" inherits="Texture" category="Core" version="3.1-dev">
+<class name="ProxyTexture" inherits="Texture" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml
index a295ffc929..a45b2ddf4b 100644
--- a/doc/classes/QuadMesh.xml
+++ b/doc/classes/QuadMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="QuadMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
+<class name="QuadMesh" inherits="PrimitiveMesh" category="Core" version="3.1">
<brief_description>
Class representing a square mesh.
</brief_description>
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index 90301db01f..3a258011b2 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Quat" category="Built-In Types" version="3.1-dev">
+<class name="Quat" category="Built-In Types" version="3.1">
<brief_description>
Quaternion.
</brief_description>
diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml
index 85702727ce..ee34560afd 100644
--- a/doc/classes/RID.xml
+++ b/doc/classes/RID.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RID" category="Built-In Types" version="3.1-dev">
+<class name="RID" category="Built-In Types" version="3.1">
<brief_description>
Handle for a [Resource]'s unique ID.
</brief_description>
diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml
index 7828445dc4..545f5cc83b 100644
--- a/doc/classes/Range.xml
+++ b/doc/classes/Range.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Range" inherits="Control" category="Core" version="3.1-dev">
+<class name="Range" inherits="Control" category="Core" version="3.1">
<brief_description>
Abstract base class for range-based controls.
</brief_description>
diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml
index 76574b305f..dce73d9c29 100644
--- a/doc/classes/RayCast.xml
+++ b/doc/classes/RayCast.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayCast" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="RayCast" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Query the closest object intersecting a ray.
</brief_description>
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index 7a6ec8ded8..79e733bcdc 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayCast2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="RayCast2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Query the closest object intersecting a ray.
</brief_description>
diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml
index 8df910a5c6..e03541011d 100644
--- a/doc/classes/RayShape.xml
+++ b/doc/classes/RayShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayShape" inherits="Shape" category="Core" version="3.1-dev">
+<class name="RayShape" inherits="Shape" category="Core" version="3.1">
<brief_description>
Ray shape for 3D collisions.
</brief_description>
diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml
index f0d63f9998..37cfe4f2d3 100644
--- a/doc/classes/RayShape2D.xml
+++ b/doc/classes/RayShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
+<class name="RayShape2D" inherits="Shape2D" category="Core" version="3.1">
<brief_description>
Ray shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index bafa5a3632..1961aee8b5 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Rect2" category="Built-In Types" version="3.1-dev">
+<class name="Rect2" category="Built-In Types" version="3.1">
<brief_description>
2D Axis-aligned bounding box.
</brief_description>
diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml
index 5e2bdf040a..4a312503f4 100644
--- a/doc/classes/RectangleShape2D.xml
+++ b/doc/classes/RectangleShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RectangleShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
+<class name="RectangleShape2D" inherits="Shape2D" category="Core" version="3.1">
<brief_description>
Rectangle shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml
index 3f4f499b3e..3238501633 100644
--- a/doc/classes/Reference.xml
+++ b/doc/classes/Reference.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Reference" inherits="Object" category="Core" version="3.1-dev">
+<class name="Reference" inherits="Object" category="Core" version="3.1">
<brief_description>
Base class for anything that keeps a reference count.
</brief_description>
diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml
index 1946ee8b81..4453e8726f 100644
--- a/doc/classes/ReferenceRect.xml
+++ b/doc/classes/ReferenceRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ReferenceRect" inherits="Control" category="Core" version="3.1-dev">
+<class name="ReferenceRect" inherits="Control" category="Core" version="3.1">
<brief_description>
Reference frame for GUI.
</brief_description>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index c565fc6a92..36a0c9cfda 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ReflectionProbe" inherits="VisualInstance" category="Core" version="3.1-dev">
+<class name="ReflectionProbe" inherits="VisualInstance" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform.xml
index 16521e27ea..a7deb273b6 100644
--- a/doc/classes/RemoteTransform.xml
+++ b/doc/classes/RemoteTransform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RemoteTransform" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="RemoteTransform" inherits="Spatial" category="Core" version="3.1">
<brief_description>
RemoteTransform leads the [Transform] of another [Spatial] derived Node in the scene.
</brief_description>
diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml
index a6c61eb2f4..bc562dcdad 100644
--- a/doc/classes/RemoteTransform2D.xml
+++ b/doc/classes/RemoteTransform2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RemoteTransform2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="RemoteTransform2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
RemoteTransform2D leads the [Transform2D] of another [CanvasItem] derived Node in the scene.
</brief_description>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 9bba251607..fc42635ce2 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Resource" inherits="Reference" category="Core" version="3.1-dev">
+<class name="Resource" inherits="Reference" category="Core" version="3.1">
<brief_description>
Base class for all resources.
</brief_description>
diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml
index 91e72ff595..09fe828bd3 100644
--- a/doc/classes/ResourceImporter.xml
+++ b/doc/classes/ResourceImporter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporter" inherits="Reference" category="Core" version="3.1-dev">
+<class name="ResourceImporter" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ResourceInteractiveLoader.xml b/doc/classes/ResourceInteractiveLoader.xml
index dba045213e..076121b42d 100644
--- a/doc/classes/ResourceInteractiveLoader.xml
+++ b/doc/classes/ResourceInteractiveLoader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceInteractiveLoader" inherits="Reference" category="Core" version="3.1-dev">
+<class name="ResourceInteractiveLoader" inherits="Reference" category="Core" version="3.1">
<brief_description>
Interactive Resource Loader.
</brief_description>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index baeb7a6bb4..ac00c13b2f 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceLoader" inherits="Object" category="Core" version="3.1-dev">
+<class name="ResourceLoader" inherits="Object" category="Core" version="3.1">
<brief_description>
Resource Loader.
</brief_description>
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index 6c3c4cd5d0..002bcd891a 100644
--- a/doc/classes/ResourcePreloader.xml
+++ b/doc/classes/ResourcePreloader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourcePreloader" inherits="Node" category="Core" version="3.1-dev">
+<class name="ResourcePreloader" inherits="Node" category="Core" version="3.1">
<brief_description>
Resource Preloader Node.
</brief_description>
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index e44244aabb..ae0d8e909d 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceSaver" inherits="Object" category="Core" version="3.1-dev">
+<class name="ResourceSaver" inherits="Object" category="Core" version="3.1">
<brief_description>
Resource Saving Interface.
</brief_description>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index dab8eb1505..49bb1aed45 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RichTextLabel" inherits="Control" category="Core" version="3.1-dev">
+<class name="RichTextLabel" inherits="Control" category="Core" version="3.1">
<brief_description>
Label that displays rich text.
</brief_description>
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
index 21bd60e138..3190aed5ed 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidBody" inherits="PhysicsBody" category="Core" version="3.1-dev">
+<class name="RigidBody" inherits="PhysicsBody" category="Core" version="3.1">
<brief_description>
Physics Body whose position is determined through physics simulation in 3D space.
</brief_description>
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index d94c917af2..75fbb48454 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core" version="3.1-dev">
+<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core" version="3.1">
<brief_description>
A body that is controlled by the 2D physics engine.
</brief_description>
diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml
index 3ce08c0878..36cddf08df 100644
--- a/doc/classes/SceneState.xml
+++ b/doc/classes/SceneState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneState" inherits="Reference" category="Core" version="3.1-dev">
+<class name="SceneState" inherits="Reference" category="Core" version="3.1">
<brief_description>
A script interface to a scene file's data.
</brief_description>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index bd6ffbaf80..be90288308 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneTree" inherits="MainLoop" category="Core" version="3.1-dev">
+<class name="SceneTree" inherits="MainLoop" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index a5b199d9d7..e1234ce88a 100644
--- a/doc/classes/SceneTreeTimer.xml
+++ b/doc/classes/SceneTreeTimer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneTreeTimer" inherits="Reference" category="Core" version="3.1-dev">
+<class name="SceneTreeTimer" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index db85890b2b..4257991e0d 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Script" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Script" inherits="Resource" category="Core" version="3.1">
<brief_description>
A class stored as a resource.
</brief_description>
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index 0b5365f583..4bfd07fdad 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScriptEditor" inherits="PanelContainer" category="Core" version="3.1-dev">
+<class name="ScriptEditor" inherits="PanelContainer" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml
index 04b3ccfca0..d3e6c62e49 100644
--- a/doc/classes/ScrollBar.xml
+++ b/doc/classes/ScrollBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScrollBar" inherits="Range" category="Core" version="3.1-dev">
+<class name="ScrollBar" inherits="Range" category="Core" version="3.1">
<brief_description>
Base class for scroll bars.
</brief_description>
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 3a613f8bcd..79b70fec99 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScrollContainer" inherits="Container" category="Core" version="3.1-dev">
+<class name="ScrollContainer" inherits="Container" category="Core" version="3.1">
<brief_description>
A helper node for displaying scrollable elements (e.g. lists).
</brief_description>
diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml
index 69dd4f7ca2..63afb37a7b 100644
--- a/doc/classes/SegmentShape2D.xml
+++ b/doc/classes/SegmentShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SegmentShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
+<class name="SegmentShape2D" inherits="Shape2D" category="Core" version="3.1">
<brief_description>
Segment shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
index 353c621818..f3a37b78e1 100644
--- a/doc/classes/Semaphore.xml
+++ b/doc/classes/Semaphore.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Semaphore" inherits="Reference" category="Core" version="3.1-dev">
+<class name="Semaphore" inherits="Reference" category="Core" version="3.1">
<brief_description>
A synchronization Semaphore.
</brief_description>
diff --git a/doc/classes/Separator.xml b/doc/classes/Separator.xml
index 725ca8d2d0..e5efa4a100 100644
--- a/doc/classes/Separator.xml
+++ b/doc/classes/Separator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Separator" inherits="Control" category="Core" version="3.1-dev">
+<class name="Separator" inherits="Control" category="Core" version="3.1">
<brief_description>
Base class for separators.
</brief_description>
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index f9f26593bf..732881c777 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Shader" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Shader" inherits="Resource" category="Core" version="3.1">
<brief_description>
To be changed, ignore.
</brief_description>
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index 57fb3ed1aa..4767686a8f 100644
--- a/doc/classes/ShaderMaterial.xml
+++ b/doc/classes/ShaderMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ShaderMaterial" inherits="Material" category="Core" version="3.1-dev">
+<class name="ShaderMaterial" inherits="Material" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml
index 240da1a43d..582e4f80c3 100644
--- a/doc/classes/Shape.xml
+++ b/doc/classes/Shape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Shape" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Shape" inherits="Resource" category="Core" version="3.1">
<brief_description>
Base class for all 3D shape resources.
</brief_description>
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
index 0f3fc44ecb..ad20bf607a 100644
--- a/doc/classes/Shape2D.xml
+++ b/doc/classes/Shape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Shape2D" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Shape2D" inherits="Resource" category="Core" version="3.1">
<brief_description>
Base class for all 2D Shapes.
</brief_description>
diff --git a/doc/classes/ShortCut.xml b/doc/classes/ShortCut.xml
index 2cb832c045..6da9d7c59d 100644
--- a/doc/classes/ShortCut.xml
+++ b/doc/classes/ShortCut.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ShortCut" inherits="Resource" category="Core" version="3.1-dev">
+<class name="ShortCut" inherits="Resource" category="Core" version="3.1">
<brief_description>
A shortcut for binding input.
</brief_description>
diff --git a/doc/classes/Skeleton.xml b/doc/classes/Skeleton.xml
index 760b2e92a9..0208d56cfa 100644
--- a/doc/classes/Skeleton.xml
+++ b/doc/classes/Skeleton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Skeleton" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="Skeleton" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Skeleton for characters and animated objects.
</brief_description>
diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml
index 4f3593dfcb..245da99084 100644
--- a/doc/classes/Sky.xml
+++ b/doc/classes/Sky.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sky" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Sky" inherits="Resource" category="Core" version="3.1">
<brief_description>
The base class for [PanoramaSky] and [ProceduralSky].
</brief_description>
diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml
index aa19a27735..554842b50e 100644
--- a/doc/classes/Slider.xml
+++ b/doc/classes/Slider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Slider" inherits="Range" category="Core" version="3.1-dev">
+<class name="Slider" inherits="Range" category="Core" version="3.1">
<brief_description>
Base class for GUI Sliders.
</brief_description>
diff --git a/doc/classes/SliderJoint.xml b/doc/classes/SliderJoint.xml
index d8e4970363..edb8e6d562 100644
--- a/doc/classes/SliderJoint.xml
+++ b/doc/classes/SliderJoint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SliderJoint" inherits="Joint" category="Core" version="3.1-dev">
+<class name="SliderJoint" inherits="Joint" category="Core" version="3.1">
<brief_description>
Piston kind of slider between two bodies in 3D.
</brief_description>
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
index b142e5c96c..822a699984 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Spatial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Spatial" inherits="Node" category="Core" version="3.1-dev">
+<class name="Spatial" inherits="Node" category="Core" version="3.1">
<brief_description>
Most basic 3D game object, parent of all 3D related nodes.
</brief_description>
diff --git a/doc/classes/SpatialGizmo.xml b/doc/classes/SpatialGizmo.xml
index fde79e19dd..68d1d03296 100644
--- a/doc/classes/SpatialGizmo.xml
+++ b/doc/classes/SpatialGizmo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpatialGizmo" inherits="Reference" category="Core" version="3.1-dev">
+<class name="SpatialGizmo" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml
index ce67ddc220..ace1aa846e 100644
--- a/doc/classes/SpatialMaterial.xml
+++ b/doc/classes/SpatialMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpatialMaterial" inherits="Material" category="Core" version="3.1-dev">
+<class name="SpatialMaterial" inherits="Material" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/SpatialVelocityTracker.xml b/doc/classes/SpatialVelocityTracker.xml
index 8d666c9f84..45cc4232dc 100644
--- a/doc/classes/SpatialVelocityTracker.xml
+++ b/doc/classes/SpatialVelocityTracker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpatialVelocityTracker" inherits="Reference" category="Core" version="3.1-dev">
+<class name="SpatialVelocityTracker" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml
index 72af6137d0..e0e2d10408 100644
--- a/doc/classes/SphereMesh.xml
+++ b/doc/classes/SphereMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SphereMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
+<class name="SphereMesh" inherits="PrimitiveMesh" category="Core" version="3.1">
<brief_description>
Class representing a spherical [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/SphereShape.xml b/doc/classes/SphereShape.xml
index cb2461942d..bc0cd79ddd 100644
--- a/doc/classes/SphereShape.xml
+++ b/doc/classes/SphereShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SphereShape" inherits="Shape" category="Core" version="3.1-dev">
+<class name="SphereShape" inherits="Shape" category="Core" version="3.1">
<brief_description>
Sphere shape for 3D collisions.
</brief_description>
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index 76dcfa97f6..0fcd5bbaf5 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpinBox" inherits="Range" category="Core" version="3.1-dev">
+<class name="SpinBox" inherits="Range" category="Core" version="3.1">
<brief_description>
Numerical input text field.
</brief_description>
diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml
index 54cfaaff63..692598f382 100644
--- a/doc/classes/SplitContainer.xml
+++ b/doc/classes/SplitContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SplitContainer" inherits="Container" category="Core" version="3.1-dev">
+<class name="SplitContainer" inherits="Container" category="Core" version="3.1">
<brief_description>
Container for splitting and adjusting.
</brief_description>
diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml
index 88e3240188..57a802d325 100644
--- a/doc/classes/SpotLight.xml
+++ b/doc/classes/SpotLight.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpotLight" inherits="Light" category="Core" version="3.1-dev">
+<class name="SpotLight" inherits="Light" category="Core" version="3.1">
<brief_description>
Spotlight [Light], such as a reflector spotlight or a lantern.
</brief_description>
diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml
index dc0310acb5..dd7fe010ba 100644
--- a/doc/classes/Sprite.xml
+++ b/doc/classes/Sprite.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sprite" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="Sprite" inherits="Node2D" category="Core" version="3.1">
<brief_description>
General purpose Sprite node.
</brief_description>
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
index 122f0b85f7..2a65246dde 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sprite3D" inherits="SpriteBase3D" category="Core" version="3.1-dev">
+<class name="Sprite3D" inherits="SpriteBase3D" category="Core" version="3.1">
<brief_description>
2D Sprite node in 3D world.
</brief_description>
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index 6dba815255..5eb4eb09af 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpriteBase3D" inherits="GeometryInstance" category="Core" version="3.1-dev">
+<class name="SpriteBase3D" inherits="GeometryInstance" category="Core" version="3.1">
<brief_description>
2D Sprite node in 3D environment.
</brief_description>
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
index e7199d7163..e806547b7d 100644
--- a/doc/classes/SpriteFrames.xml
+++ b/doc/classes/SpriteFrames.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpriteFrames" inherits="Resource" category="Core" version="3.1-dev">
+<class name="SpriteFrames" inherits="Resource" category="Core" version="3.1">
<brief_description>
Sprite frame library for AnimatedSprite.
</brief_description>
diff --git a/doc/classes/StaticBody.xml b/doc/classes/StaticBody.xml
index df56330c08..26b4857670 100644
--- a/doc/classes/StaticBody.xml
+++ b/doc/classes/StaticBody.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StaticBody" inherits="PhysicsBody" category="Core" version="3.1-dev">
+<class name="StaticBody" inherits="PhysicsBody" category="Core" version="3.1">
<brief_description>
Static body for 3D Physics.
</brief_description>
diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml
index ca12699061..95acda79df 100644
--- a/doc/classes/StaticBody2D.xml
+++ b/doc/classes/StaticBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StaticBody2D" inherits="PhysicsBody2D" category="Core" version="3.1-dev">
+<class name="StaticBody2D" inherits="PhysicsBody2D" category="Core" version="3.1">
<brief_description>
Static body for 2D Physics.
</brief_description>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index 4ab83f8d8a..ebe29c7e24 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeer" inherits="Reference" category="Core" version="3.1-dev">
+<class name="StreamPeer" inherits="Reference" category="Core" version="3.1">
<brief_description>
Abstraction and base class for stream-based protocols.
</brief_description>
diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml
index a3c118ec60..3d9bdce762 100644
--- a/doc/classes/StreamPeerBuffer.xml
+++ b/doc/classes/StreamPeerBuffer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerBuffer" inherits="StreamPeer" category="Core" version="3.1-dev">
+<class name="StreamPeerBuffer" inherits="StreamPeer" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
index 32459efd47..d7350ac1d5 100644
--- a/doc/classes/StreamPeerSSL.xml
+++ b/doc/classes/StreamPeerSSL.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerSSL" inherits="StreamPeer" category="Core" version="3.1-dev">
+<class name="StreamPeerSSL" inherits="StreamPeer" category="Core" version="3.1">
<brief_description>
SSL Stream peer.
</brief_description>
diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml
index ef856551bb..5fc8e99ced 100644
--- a/doc/classes/StreamPeerTCP.xml
+++ b/doc/classes/StreamPeerTCP.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerTCP" inherits="StreamPeer" category="Core" version="3.1-dev">
+<class name="StreamPeerTCP" inherits="StreamPeer" category="Core" version="3.1">
<brief_description>
TCP Stream peer.
</brief_description>
diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture.xml
index 7ed95ef01c..3b44d0f00f 100644
--- a/doc/classes/StreamTexture.xml
+++ b/doc/classes/StreamTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamTexture" inherits="Texture" category="Core" version="3.1-dev">
+<class name="StreamTexture" inherits="Texture" category="Core" version="3.1">
<brief_description>
A .stex texture.
</brief_description>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 01d8dc32e6..d8d432e30f 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="String" category="Built-In Types" version="3.1-dev">
+<class name="String" category="Built-In Types" version="3.1">
<brief_description>
Built-in string class.
</brief_description>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index 1e68d83237..dee3e6db49 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBox" inherits="Resource" category="Core" version="3.1-dev">
+<class name="StyleBox" inherits="Resource" category="Core" version="3.1">
<brief_description>
Base class for drawing stylized boxes for the UI.
</brief_description>
diff --git a/doc/classes/StyleBoxEmpty.xml b/doc/classes/StyleBoxEmpty.xml
index b5000da265..a9eeeddd93 100644
--- a/doc/classes/StyleBoxEmpty.xml
+++ b/doc/classes/StyleBoxEmpty.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxEmpty" inherits="StyleBox" category="Core" version="3.1-dev">
+<class name="StyleBoxEmpty" inherits="StyleBox" category="Core" version="3.1">
<brief_description>
Empty stylebox (does not display anything).
</brief_description>
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index a64ca31ff0..641d6214a4 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxFlat" inherits="StyleBox" category="Core" version="3.1-dev">
+<class name="StyleBoxFlat" inherits="StyleBox" category="Core" version="3.1">
<brief_description>
Customizable Stylebox with a given set of parameters. (no texture required)
</brief_description>
diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml
index 9fa2790a4b..c891c8cf83 100644
--- a/doc/classes/StyleBoxLine.xml
+++ b/doc/classes/StyleBoxLine.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxLine" inherits="StyleBox" category="Core" version="3.1-dev">
+<class name="StyleBoxLine" inherits="StyleBox" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index f789252e1d..d8c378fde2 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxTexture" inherits="StyleBox" category="Core" version="3.1-dev">
+<class name="StyleBoxTexture" inherits="StyleBox" category="Core" version="3.1">
<brief_description>
Texture Based 3x3 scale style.
</brief_description>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 71cfc9bb9a..d8644c5419 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SurfaceTool" inherits="Reference" category="Core" version="3.1-dev">
+<class name="SurfaceTool" inherits="Reference" category="Core" version="3.1">
<brief_description>
Helper tool to create geometry.
</brief_description>
diff --git a/doc/classes/TCP_Server.xml b/doc/classes/TCP_Server.xml
index cac81f8e05..4e3544ce5c 100644
--- a/doc/classes/TCP_Server.xml
+++ b/doc/classes/TCP_Server.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TCP_Server" inherits="Reference" category="Core" version="3.1-dev">
+<class name="TCP_Server" inherits="Reference" category="Core" version="3.1">
<brief_description>
TCP Server.
</brief_description>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index eb3b270938..330487adf7 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TabContainer" inherits="Control" category="Core" version="3.1-dev">
+<class name="TabContainer" inherits="Control" category="Core" version="3.1">
<brief_description>
Tabbed Container.
</brief_description>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index 7c3e28ec3c..615bc83c2d 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tabs" inherits="Control" category="Core" version="3.1-dev">
+<class name="Tabs" inherits="Control" category="Core" version="3.1">
<brief_description>
Tabs Control.
</brief_description>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index c39baa8a8c..8a71cb2059 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextEdit" inherits="Control" category="Core" version="3.1-dev">
+<class name="TextEdit" inherits="Control" category="Core" version="3.1">
<brief_description>
Multiline text editing control.
</brief_description>
diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml
index 997324992a..3d3ceca150 100644
--- a/doc/classes/Texture.xml
+++ b/doc/classes/Texture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Texture" inherits="Resource" category="Core" version="3.1">
<brief_description>
Texture for 2D and 3D.
</brief_description>
diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml
index 1f9c6acb47..7e54ab9fe8 100644
--- a/doc/classes/TextureButton.xml
+++ b/doc/classes/TextureButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureButton" inherits="BaseButton" category="Core" version="3.1-dev">
+<class name="TextureButton" inherits="BaseButton" category="Core" version="3.1">
<brief_description>
Texture-based button. Supports Pressed, Hover, Disabled and Focused states.
</brief_description>
diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml
index 3c4ed13746..18bd886b0b 100644
--- a/doc/classes/TextureProgress.xml
+++ b/doc/classes/TextureProgress.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureProgress" inherits="Range" category="Core" version="3.1-dev">
+<class name="TextureProgress" inherits="Range" category="Core" version="3.1">
<brief_description>
Texture-based progress bar. Useful for loading screens and life or stamina bars.
</brief_description>
diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml
index 8d18adcc36..7a4208ccea 100644
--- a/doc/classes/TextureRect.xml
+++ b/doc/classes/TextureRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureRect" inherits="Control" category="Core" version="3.1-dev">
+<class name="TextureRect" inherits="Control" category="Core" version="3.1">
<brief_description>
Draws a sprite or a texture inside a User Interface. The texture can tile or not.
</brief_description>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index 4134936764..fe43b54d5e 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Theme" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Theme" inherits="Resource" category="Core" version="3.1">
<brief_description>
Theme for controls.
</brief_description>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index c5aac8f1ce..48d075c7f5 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Thread" inherits="Reference" category="Core" version="3.1-dev">
+<class name="Thread" inherits="Reference" category="Core" version="3.1">
<brief_description>
A unit of execution in a process.
</brief_description>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 0a5fc1951b..237b5f62d4 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TileMap" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="TileMap" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Node for 2D tile-based maps.
</brief_description>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 3b9a34abff..10978970e9 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TileSet" inherits="Resource" category="Core" version="3.1-dev">
+<class name="TileSet" inherits="Resource" category="Core" version="3.1">
<brief_description>
Tile library for tilemaps.
</brief_description>
diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml
index 892b14a933..aba1b78188 100644
--- a/doc/classes/Timer.xml
+++ b/doc/classes/Timer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Timer" inherits="Node" category="Core" version="3.1-dev">
+<class name="Timer" inherits="Node" category="Core" version="3.1">
<brief_description>
A countdown timer.
</brief_description>
diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml
index 916585ecf7..1dbfd63010 100644
--- a/doc/classes/ToolButton.xml
+++ b/doc/classes/ToolButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ToolButton" inherits="Button" category="Core" version="3.1-dev">
+<class name="ToolButton" inherits="Button" category="Core" version="3.1">
<brief_description>
Flat button helper class.
</brief_description>
diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml
index 50bb23f5d9..1b37ce95ba 100644
--- a/doc/classes/TouchScreenButton.xml
+++ b/doc/classes/TouchScreenButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TouchScreenButton" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="TouchScreenButton" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Button for touch screen devices.
</brief_description>
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index 2ebdea9d5e..df5c2ab3ae 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Transform" category="Built-In Types" version="3.1-dev">
+<class name="Transform" category="Built-In Types" version="3.1">
<brief_description>
3D Transformation. 3x4 matrix.
</brief_description>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 11b8b37ebd..d5427ad7f8 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Transform2D" category="Built-In Types" version="3.1-dev">
+<class name="Transform2D" category="Built-In Types" version="3.1">
<brief_description>
2D Transformation. 3x2 matrix.
</brief_description>
diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml
index d3964b8f02..c4e9dbfb70 100644
--- a/doc/classes/Translation.xml
+++ b/doc/classes/Translation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Translation" inherits="Resource" category="Core" version="3.1-dev">
+<class name="Translation" inherits="Resource" category="Core" version="3.1">
<brief_description>
Language Translation.
</brief_description>
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index a95ae9b2a3..52d2b2cc47 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TranslationServer" inherits="Object" category="Core" version="3.1-dev">
+<class name="TranslationServer" inherits="Object" category="Core" version="3.1">
<brief_description>
Server that manages all translations. Translations can be set to it and removed from it.
</brief_description>
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 7e8cc1179c..25426ee72c 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tree" inherits="Control" category="Core" version="3.1-dev">
+<class name="Tree" inherits="Control" category="Core" version="3.1">
<brief_description>
Control to show a tree of items.
</brief_description>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 21b3223cd3..6448b26972 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TreeItem" inherits="Object" category="Core" version="3.1-dev">
+<class name="TreeItem" inherits="Object" category="Core" version="3.1">
<brief_description>
Control for a single item inside a [Tree].
</brief_description>
diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml
index a55130744f..2bdc7b61f4 100644
--- a/doc/classes/TriangleMesh.xml
+++ b/doc/classes/TriangleMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TriangleMesh" inherits="Reference" category="Core" version="3.1-dev">
+<class name="TriangleMesh" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index dabf8a59b3..54e445d3ee 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tween" inherits="Node" category="Core" version="3.1-dev">
+<class name="Tween" inherits="Node" category="Core" version="3.1">
<brief_description>
Node useful for animations with unknown start and end points.
</brief_description>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index 13f0a506da..a1a6d7f465 100644
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="UndoRedo" inherits="Object" category="Core" version="3.1-dev">
+<class name="UndoRedo" inherits="Object" category="Core" version="3.1">
<brief_description>
Helper to manage UndoRedo in the editor or custom tools.
</brief_description>
diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml
index d1eb013f29..43a7be74c3 100644
--- a/doc/classes/VBoxContainer.xml
+++ b/doc/classes/VBoxContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VBoxContainer" inherits="BoxContainer" category="Core" version="3.1-dev">
+<class name="VBoxContainer" inherits="BoxContainer" category="Core" version="3.1">
<brief_description>
Vertical box container.
</brief_description>
diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml
index 9958b40027..5486140870 100644
--- a/doc/classes/VScrollBar.xml
+++ b/doc/classes/VScrollBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VScrollBar" inherits="ScrollBar" category="Core" version="3.1-dev">
+<class name="VScrollBar" inherits="ScrollBar" category="Core" version="3.1">
<brief_description>
Vertical version of [ScrollBar], which goes from left (min) to right (max).
</brief_description>
diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml
index 2b7027076c..4890b2d930 100644
--- a/doc/classes/VSeparator.xml
+++ b/doc/classes/VSeparator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VSeparator" inherits="Separator" category="Core" version="3.1-dev">
+<class name="VSeparator" inherits="Separator" category="Core" version="3.1">
<brief_description>
Vertical version of [Separator].
</brief_description>
diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml
index 404626c32d..1dc1b795f7 100644
--- a/doc/classes/VSlider.xml
+++ b/doc/classes/VSlider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VSlider" inherits="Slider" category="Core" version="3.1-dev">
+<class name="VSlider" inherits="Slider" category="Core" version="3.1">
<brief_description>
Vertical slider.
</brief_description>
diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml
index 903539fd54..2203035db3 100644
--- a/doc/classes/VSplitContainer.xml
+++ b/doc/classes/VSplitContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VSplitContainer" inherits="SplitContainer" category="Core" version="3.1-dev">
+<class name="VSplitContainer" inherits="SplitContainer" category="Core" version="3.1">
<brief_description>
Vertical split container.
</brief_description>
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index 27e6799fd4..b2d21921a1 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Variant" category="Core" version="3.1-dev">
+<class name="Variant" category="Core" version="3.1">
<brief_description>
The most important data type in Godot.
</brief_description>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 7666425e86..9df2eb143b 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Vector2" category="Built-In Types" version="3.1-dev">
+<class name="Vector2" category="Built-In Types" version="3.1">
<brief_description>
Vector used for 2D Math.
</brief_description>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 09afa17282..940d4dd6cf 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Vector3" category="Built-In Types" version="3.1-dev">
+<class name="Vector3" category="Built-In Types" version="3.1">
<brief_description>
Vector class, which performs basic 3D vector math operations.
</brief_description>
diff --git a/doc/classes/VehicleBody.xml b/doc/classes/VehicleBody.xml
index 873490c0c8..3ce0cadde9 100644
--- a/doc/classes/VehicleBody.xml
+++ b/doc/classes/VehicleBody.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VehicleBody" inherits="RigidBody" category="Core" version="3.1-dev">
+<class name="VehicleBody" inherits="RigidBody" category="Core" version="3.1">
<brief_description>
Physics body that simulates the behaviour of a car.
</brief_description>
diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml
index 4dceecedef..6f9f5ea2c5 100644
--- a/doc/classes/VehicleWheel.xml
+++ b/doc/classes/VehicleWheel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VehicleWheel" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="VehicleWheel" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Physics object that simulates the behaviour of a wheel.
</brief_description>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index aa827c6e2c..48d09ccd95 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoPlayer" inherits="Control" category="Core" version="3.1-dev">
+<class name="VideoPlayer" inherits="Control" category="Core" version="3.1">
<brief_description>
Control to play video files.
</brief_description>
diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml
index c777673cf4..6bfa48511b 100644
--- a/doc/classes/VideoStream.xml
+++ b/doc/classes/VideoStream.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStream" inherits="Resource" category="Core" version="3.1-dev">
+<class name="VideoStream" inherits="Resource" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 6aac66269d..a485205736 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Viewport" inherits="Node" category="Core" version="3.1-dev">
+<class name="Viewport" inherits="Node" category="Core" version="3.1">
<brief_description>
Creates a sub-view into the screen.
</brief_description>
diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml
index 8c89a2c1be..8c60fb473d 100644
--- a/doc/classes/ViewportContainer.xml
+++ b/doc/classes/ViewportContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ViewportContainer" inherits="Container" category="Core" version="3.1-dev">
+<class name="ViewportContainer" inherits="Container" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml
index 6900c6563d..83ffc6bcfd 100644
--- a/doc/classes/ViewportTexture.xml
+++ b/doc/classes/ViewportTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ViewportTexture" inherits="Texture" category="Core" version="3.1-dev">
+<class name="ViewportTexture" inherits="Texture" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml
index 0094a9b3cc..83ba9495e5 100644
--- a/doc/classes/VisibilityEnabler.xml
+++ b/doc/classes/VisibilityEnabler.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core" version="3.1-dev">
+<class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core" version="3.1">
<brief_description>
Enable certain nodes only when visible.
</brief_description>
diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml
index 6b66d76733..8dfbaec6e8 100644
--- a/doc/classes/VisibilityEnabler2D.xml
+++ b/doc/classes/VisibilityEnabler2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core" version="3.1-dev">
+<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core" version="3.1">
<brief_description>
Enable certain nodes only when visible.
</brief_description>
diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml
index c430a1336d..2f22dc99bf 100644
--- a/doc/classes/VisibilityNotifier.xml
+++ b/doc/classes/VisibilityNotifier.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityNotifier" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="VisibilityNotifier" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Detects when the node is visible on screen.
</brief_description>
diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml
index 67b3525eb4..b98f2794d2 100644
--- a/doc/classes/VisibilityNotifier2D.xml
+++ b/doc/classes/VisibilityNotifier2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityNotifier2D" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="VisibilityNotifier2D" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Detects when the node is visible on screen.
</brief_description>
diff --git a/doc/classes/VisualInstance.xml b/doc/classes/VisualInstance.xml
index 81e1bcf7f7..502209fac5 100644
--- a/doc/classes/VisualInstance.xml
+++ b/doc/classes/VisualInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualInstance" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="VisualInstance" inherits="Spatial" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml
index b709883dad..bd1a9fb3e5 100644
--- a/doc/classes/VisualServer.xml
+++ b/doc/classes/VisualServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualServer" inherits="Object" category="Core" version="3.1-dev">
+<class name="VisualServer" inherits="Object" category="Core" version="3.1">
<brief_description>
Server for anything visible.
</brief_description>
diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml
index adaa964630..4a0f3588c2 100644
--- a/doc/classes/WeakRef.xml
+++ b/doc/classes/WeakRef.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WeakRef" inherits="Reference" category="Core" version="3.1-dev">
+<class name="WeakRef" inherits="Reference" category="Core" version="3.1">
<brief_description>
Holds an [Object], but does not contribute to the reference count if the object is a reference.
</brief_description>
diff --git a/doc/classes/WebSocketClient.xml b/doc/classes/WebSocketClient.xml
index 9c0685031c..79313c90c7 100644
--- a/doc/classes/WebSocketClient.xml
+++ b/doc/classes/WebSocketClient.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebSocketClient" inherits="WebSocketMultiplayerPeer" category="Core" version="3.1-dev">
+<class name="WebSocketClient" inherits="WebSocketMultiplayerPeer" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/WebSocketMultiplayerPeer.xml b/doc/classes/WebSocketMultiplayerPeer.xml
index b49d4c48e0..a1014350f5 100644
--- a/doc/classes/WebSocketMultiplayerPeer.xml
+++ b/doc/classes/WebSocketMultiplayerPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebSocketMultiplayerPeer" inherits="NetworkedMultiplayerPeer" category="Core" version="3.1-dev">
+<class name="WebSocketMultiplayerPeer" inherits="NetworkedMultiplayerPeer" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/WebSocketPeer.xml b/doc/classes/WebSocketPeer.xml
index fba8322889..276249e65a 100644
--- a/doc/classes/WebSocketPeer.xml
+++ b/doc/classes/WebSocketPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebSocketPeer" inherits="PacketPeer" category="Core" version="3.1-dev">
+<class name="WebSocketPeer" inherits="PacketPeer" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/WebSocketServer.xml b/doc/classes/WebSocketServer.xml
index 887df696ff..9a7108952f 100644
--- a/doc/classes/WebSocketServer.xml
+++ b/doc/classes/WebSocketServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebSocketServer" inherits="WebSocketMultiplayerPeer" category="Core" version="3.1-dev">
+<class name="WebSocketServer" inherits="WebSocketMultiplayerPeer" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml
index ef4f6196b5..39487f5020 100644
--- a/doc/classes/WindowDialog.xml
+++ b/doc/classes/WindowDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WindowDialog" inherits="Popup" category="Core" version="3.1-dev">
+<class name="WindowDialog" inherits="Popup" category="Core" version="3.1">
<brief_description>
Base class for window dialogs.
</brief_description>
diff --git a/doc/classes/World.xml b/doc/classes/World.xml
index 810e659c74..9fc0e139b5 100644
--- a/doc/classes/World.xml
+++ b/doc/classes/World.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="World" inherits="Resource" category="Core" version="3.1-dev">
+<class name="World" inherits="Resource" category="Core" version="3.1">
<brief_description>
Class that has everything pertaining to a world.
</brief_description>
diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml
index acde276c1d..5f6a5b8ad4 100644
--- a/doc/classes/World2D.xml
+++ b/doc/classes/World2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="World2D" inherits="Resource" category="Core" version="3.1-dev">
+<class name="World2D" inherits="Resource" category="Core" version="3.1">
<brief_description>
Class that has everything pertaining to a 2D world.
</brief_description>
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index 266f94c317..422ca3a558 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WorldEnvironment" inherits="Node" category="Core" version="3.1-dev">
+<class name="WorldEnvironment" inherits="Node" category="Core" version="3.1">
<brief_description>
Default environment properties for the entire scene (post-processing effects, lightning and background settings).
</brief_description>
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
index 8855adec22..fb03ab1692 100644
--- a/doc/classes/XMLParser.xml
+++ b/doc/classes/XMLParser.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XMLParser" inherits="Reference" category="Core" version="3.1-dev">
+<class name="XMLParser" inherits="Reference" category="Core" version="3.1">
<brief_description>
Low-level class for creating parsers for XML files.
</brief_description>
diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml
index fdccfaf531..12b9cb623f 100644
--- a/doc/classes/YSort.xml
+++ b/doc/classes/YSort.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="YSort" inherits="Node2D" category="Core" version="3.1-dev">
+<class name="YSort" inherits="Node2D" category="Core" version="3.1">
<brief_description>
Sort all child nodes based on their Y positions.
</brief_description>
diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml
index ed95da869b..0fec8eb530 100644
--- a/doc/classes/bool.xml
+++ b/doc/classes/bool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="bool" category="Built-In Types" version="3.1-dev">
+<class name="bool" category="Built-In Types" version="3.1">
<brief_description>
Boolean built-in type
</brief_description>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index c576c27687..ef3c3d72eb 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="float" category="Built-In Types" version="3.1-dev">
+<class name="float" category="Built-In Types" version="3.1">
<brief_description>
Float built-in type
</brief_description>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index a86353e97e..4855fa2848 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="int" category="Built-In Types" version="3.1-dev">
+<class name="int" category="Built-In Types" version="3.1">
<brief_description>
Integer built-in type.
</brief_description>
diff --git a/drivers/SCsub b/drivers/SCsub
index fc017f4891..2c5e9434e8 100644
--- a/drivers/SCsub
+++ b/drivers/SCsub
@@ -24,6 +24,7 @@ if env['xaudio2']:
# Graphics drivers
if (env["platform"] != "server"):
SConscript('gles3/SCsub')
+ SConscript('gles2/SCsub')
SConscript('gl_context/SCsub')
else:
SConscript('dummy/SCsub')
diff --git a/drivers/gles2/SCsub b/drivers/gles2/SCsub
new file mode 100644
index 0000000000..2471dd3739
--- /dev/null
+++ b/drivers/gles2/SCsub
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+
+Import('env')
+
+env.add_source_files(env.drivers_sources,"*.cpp")
+
+SConscript("shaders/SCsub")
diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp
new file mode 100644
index 0000000000..5efd27de7f
--- /dev/null
+++ b/drivers/gles2/rasterizer_canvas_gles2.cpp
@@ -0,0 +1,1147 @@
+/*************************************************************************/
+/* rasterizer_canvas_gles2.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 "rasterizer_canvas_gles2.h"
+#include "os/os.h"
+#include "project_settings.h"
+#include "rasterizer_scene_gles2.h"
+#include "servers/visual/visual_server_raster.h"
+#ifndef GLES_OVER_GL
+#define glClearDepth glClearDepthf
+#endif
+
+RID RasterizerCanvasGLES2::light_internal_create() {
+
+ return RID();
+}
+
+void RasterizerCanvasGLES2::light_internal_update(RID p_rid, Light *p_light) {
+}
+
+void RasterizerCanvasGLES2::light_internal_free(RID p_rid) {
+}
+
+void RasterizerCanvasGLES2::_set_uniforms() {
+
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::PROJECTION_MATRIX, state.uniforms.projection_matrix);
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX, state.uniforms.modelview_matrix);
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX, state.uniforms.extra_matrix);
+
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::FINAL_MODULATE, state.uniforms.final_modulate);
+}
+
+void RasterizerCanvasGLES2::canvas_begin() {
+
+ if (storage->frame.clear_request) {
+ glClearColor(storage->frame.clear_request_color.r,
+ storage->frame.clear_request_color.g,
+ storage->frame.clear_request_color.b,
+ storage->frame.clear_request_color.a);
+ glClear(GL_COLOR_BUFFER_BIT);
+ storage->frame.clear_request = false;
+ }
+
+ if (storage->frame.current_rt) {
+ glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->fbo);
+ glColorMask(1, 1, 1, 1);
+ }
+
+ reset_canvas();
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, storage->resources.white_tex);
+
+ glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1);
+ glDisableVertexAttribArray(VS::ARRAY_COLOR);
+
+ // set up default uniforms
+
+ Transform canvas_transform;
+
+ if (storage->frame.current_rt) {
+
+ float csy = 1.0;
+ if (storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_VFLIP]) {
+ csy = -1.0;
+ }
+ canvas_transform.translate(-(storage->frame.current_rt->width / 2.0f), -(storage->frame.current_rt->height / 2.0f), 0.0f);
+ canvas_transform.scale(Vector3(2.0f / storage->frame.current_rt->width, csy * -2.0f / storage->frame.current_rt->height, 1.0f));
+ } else {
+ Vector2 ssize = OS::get_singleton()->get_window_size();
+ canvas_transform.translate(-(ssize.width / 2.0f), -(ssize.height / 2.0f), 0.0f);
+ canvas_transform.scale(Vector3(2.0f / ssize.width, -2.0f / ssize.height, 1.0f));
+ }
+
+ state.uniforms.projection_matrix = canvas_transform;
+
+ state.uniforms.final_modulate = Color(1, 1, 1, 1);
+
+ state.uniforms.modelview_matrix = Transform2D();
+ state.uniforms.extra_matrix = Transform2D();
+
+ _set_uniforms();
+ _bind_quad_buffer();
+}
+
+void RasterizerCanvasGLES2::canvas_end() {
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+
+ for (int i = 0; i < VS::ARRAY_MAX; i++) {
+ glDisableVertexAttribArray(i);
+ }
+
+ state.using_texture_rect = false;
+ state.using_ninepatch = false;
+}
+
+RasterizerStorageGLES2::Texture *RasterizerCanvasGLES2::_bind_canvas_texture(const RID &p_texture, const RID &p_normal_map) {
+
+ RasterizerStorageGLES2::Texture *tex_return = NULL;
+
+ if (p_texture.is_valid()) {
+
+ RasterizerStorageGLES2::Texture *texture = storage->texture_owner.getornull(p_texture);
+
+ if (!texture) {
+ state.current_tex = RID();
+ state.current_tex_ptr = NULL;
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, storage->resources.white_tex);
+
+ } else {
+
+ texture = texture->get_ptr();
+
+ if (texture->render_target) {
+ texture->render_target->used_in_frame = true;
+ }
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, texture->tex_id);
+
+ state.current_tex = p_texture;
+ state.current_tex_ptr = texture;
+
+ tex_return = texture;
+ }
+ } else {
+ state.current_tex = RID();
+ state.current_tex_ptr = NULL;
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, storage->resources.white_tex);
+ }
+
+ return tex_return;
+}
+
+void RasterizerCanvasGLES2::_set_texture_rect_mode(bool p_enable, bool p_ninepatch) {
+}
+
+void RasterizerCanvasGLES2::_draw_polygon(const int *p_indices, int p_index_count, int p_vertex_count, const Vector2 *p_vertices, const Vector2 *p_uvs, const Color *p_colors, bool p_singlecolor) {
+
+ glBindBuffer(GL_ARRAY_BUFFER, data.polygon_buffer);
+
+ uint32_t buffer_ofs = 0;
+
+ glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(Vector2) * p_vertex_count, p_vertices);
+ glEnableVertexAttribArray(VS::ARRAY_VERTEX);
+ glVertexAttribPointer(VS::ARRAY_VERTEX, 2, GL_FLOAT, GL_FALSE, sizeof(Vector2), NULL);
+ buffer_ofs += sizeof(Vector2) * p_vertex_count;
+
+ if (p_singlecolor) {
+ glDisableVertexAttribArray(VS::ARRAY_COLOR);
+ Color m = *p_colors;
+ glVertexAttrib4f(VS::ARRAY_COLOR, m.r, m.g, m.b, m.a);
+ } else if (!p_colors) {
+ glDisableVertexAttribArray(VS::ARRAY_COLOR);
+ glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1);
+ } else {
+ glBufferSubData(GL_ARRAY_BUFFER, buffer_ofs, sizeof(Color) * p_vertex_count, p_colors);
+ glEnableVertexAttribArray(VS::ARRAY_COLOR);
+ glVertexAttribPointer(VS::ARRAY_COLOR, 4, GL_FLOAT, GL_FALSE, sizeof(Color), ((uint8_t *)0) + buffer_ofs);
+ buffer_ofs += sizeof(Color) * p_vertex_count;
+ }
+
+ if (p_uvs) {
+ glBufferSubData(GL_ARRAY_BUFFER, buffer_ofs, sizeof(Vector2) * p_vertex_count, p_uvs);
+ glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
+ glVertexAttribPointer(VS::ARRAY_TEX_UV, 2, GL_FLOAT, GL_FALSE, sizeof(Vector2), ((uint8_t *)0) + buffer_ofs);
+ buffer_ofs += sizeof(Vector2) * p_vertex_count;
+ } else {
+ glDisableVertexAttribArray(VS::ARRAY_TEX_UV);
+ }
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, data.polygon_index_buffer);
+ glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, sizeof(int) * p_index_count, p_indices);
+
+ glDrawElements(GL_TRIANGLES, p_index_count, GL_UNSIGNED_INT, 0);
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+}
+
+void RasterizerCanvasGLES2::_draw_generic(GLuint p_primitive, int p_vertex_count, const Vector2 *p_vertices, const Vector2 *p_uvs, const Color *p_colors, bool p_singlecolor) {
+
+ glBindBuffer(GL_ARRAY_BUFFER, data.polygon_buffer);
+
+ uint32_t buffer_ofs = 0;
+
+ glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(Vector2) * p_vertex_count, p_vertices);
+ glEnableVertexAttribArray(VS::ARRAY_VERTEX);
+ glVertexAttribPointer(VS::ARRAY_VERTEX, 2, GL_FLOAT, GL_FALSE, sizeof(Vector2), (uint8_t *)0);
+ buffer_ofs += sizeof(Vector2) * p_vertex_count;
+
+ if (p_singlecolor) {
+ glDisableVertexAttribArray(VS::ARRAY_COLOR);
+ Color m = *p_colors;
+ glVertexAttrib4f(VS::ARRAY_COLOR, m.r, m.g, m.b, m.a);
+ } else if (!p_colors) {
+ glDisableVertexAttribArray(VS::ARRAY_COLOR);
+ glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1);
+ } else {
+ glBufferSubData(GL_ARRAY_BUFFER, buffer_ofs, sizeof(Color) * p_vertex_count, p_colors);
+ glEnableVertexAttribArray(VS::ARRAY_COLOR);
+ glVertexAttribPointer(VS::ARRAY_COLOR, 4, GL_FLOAT, GL_FALSE, sizeof(Color), ((uint8_t *)0) + buffer_ofs);
+ buffer_ofs += sizeof(Color) * p_vertex_count;
+ }
+
+ if (p_uvs) {
+ glBufferSubData(GL_ARRAY_BUFFER, buffer_ofs, sizeof(Vector2) * p_vertex_count, p_uvs);
+ glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
+ glVertexAttribPointer(VS::ARRAY_TEX_UV, 2, GL_FLOAT, GL_FALSE, sizeof(Vector2), ((uint8_t *)0) + buffer_ofs);
+ } else {
+ glDisableVertexAttribArray(VS::ARRAY_TEX_UV);
+ }
+
+ glDrawArrays(p_primitive, 0, p_vertex_count);
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+}
+
+void RasterizerCanvasGLES2::_draw_gui_primitive(int p_points, const Vector2 *p_vertices, const Color *p_colors, const Vector2 *p_uvs) {
+
+ static const GLenum prim[5] = { GL_POINTS, GL_POINTS, GL_LINES, GL_TRIANGLES, GL_TRIANGLE_FAN };
+
+ int color_offset = 0;
+ int uv_offset = 0;
+ int stride = 2;
+
+ if (p_colors) {
+ color_offset = stride;
+ stride += 4;
+ }
+
+ if (p_uvs) {
+ uv_offset = stride;
+ stride += 2;
+ }
+
+ float buffer_data[(2 + 2 + 4) * 4];
+
+ for (int i = 0; i < p_points; i++) {
+ buffer_data[stride * i + 0] = p_vertices[i].x;
+ buffer_data[stride * i + 1] = p_vertices[i].y;
+ }
+
+ if (p_colors) {
+ for (int i = 0; i < p_points; i++) {
+ buffer_data[stride * i + color_offset + 0] = p_colors[i].r;
+ buffer_data[stride * i + color_offset + 1] = p_colors[i].g;
+ buffer_data[stride * i + color_offset + 2] = p_colors[i].b;
+ buffer_data[stride * i + color_offset + 3] = p_colors[i].a;
+ }
+ }
+
+ if (p_uvs) {
+ for (int i = 0; i < p_points; i++) {
+ buffer_data[stride * i + uv_offset + 0] = p_uvs[i].x;
+ buffer_data[stride * i + uv_offset + 1] = p_uvs[i].y;
+ }
+ }
+
+ glBindBuffer(GL_ARRAY_BUFFER, data.polygon_buffer);
+ glBufferSubData(GL_ARRAY_BUFFER, 0, p_points * stride * 4 * sizeof(float), buffer_data);
+
+ glVertexAttribPointer(VS::ARRAY_VERTEX, 2, GL_FLOAT, GL_FALSE, stride * sizeof(float), NULL);
+
+ if (p_colors) {
+ glVertexAttribPointer(VS::ARRAY_COLOR, 4, GL_FLOAT, GL_FALSE, stride * sizeof(float), (uint8_t *)0 + color_offset * sizeof(float));
+ glEnableVertexAttribArray(VS::ARRAY_COLOR);
+ }
+
+ if (p_uvs) {
+ glVertexAttribPointer(VS::ARRAY_TEX_UV, 2, GL_FLOAT, GL_FALSE, stride * sizeof(float), (uint8_t *)0 + uv_offset * sizeof(float));
+ glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
+ }
+
+ glDrawArrays(prim[p_points], 0, p_points);
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+}
+
+void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *current_clip, bool &reclip) {
+
+ int command_count = p_item->commands.size();
+ Item::Command **commands = p_item->commands.ptrw();
+
+ for (int i = 0; i < command_count; i++) {
+
+ Item::Command *command = commands[i];
+
+ switch (command->type) {
+
+ case Item::Command::TYPE_LINE: {
+
+ Item::CommandLine *line = static_cast<Item::CommandLine *>(command);
+
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, false);
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_UV_ATTRIBUTE, false);
+ state.canvas_shader.bind();
+
+ _set_uniforms();
+
+ _bind_canvas_texture(RID(), RID());
+
+ glDisableVertexAttribArray(VS::ARRAY_COLOR);
+ glVertexAttrib4fv(VS::ARRAY_COLOR, line->color.components);
+
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX, state.uniforms.modelview_matrix);
+
+ if (line->width <= 1) {
+ Vector2 verts[2] = {
+ Vector2(line->from.x, line->from.y),
+ Vector2(line->to.x, line->to.y)
+ };
+
+ _draw_gui_primitive(2, verts, NULL, NULL);
+ } else {
+ Vector2 t = (line->from - line->to).normalized().tangent() * line->width * 0.5;
+
+ Vector2 verts[4] = {
+ line->from - t,
+ line->from + t,
+ line->to + t,
+ line->to - t
+ };
+
+ _draw_gui_primitive(4, verts, NULL, NULL);
+ }
+
+ } break;
+
+ case Item::Command::TYPE_RECT: {
+
+ Item::CommandRect *r = static_cast<Item::CommandRect *>(command);
+
+ glDisableVertexAttribArray(VS::ARRAY_COLOR);
+ glVertexAttrib4fv(VS::ARRAY_COLOR, r->modulate.components);
+
+ _bind_quad_buffer();
+
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, true);
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_UV_ATTRIBUTE, false);
+ if (state.canvas_shader.bind())
+ _set_uniforms();
+
+ RasterizerStorageGLES2::Texture *tex = _bind_canvas_texture(r->texture, r->normal_map);
+
+ if (!tex) {
+ Rect2 dst_rect = Rect2(r->rect.position, r->rect.size);
+
+ if (dst_rect.size.width < 0) {
+ dst_rect.position.x += dst_rect.size.width;
+ dst_rect.size.width *= -1;
+ }
+ if (dst_rect.size.height < 0) {
+ dst_rect.position.y += dst_rect.size.height;
+ dst_rect.size.height *= -1;
+ }
+
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::DST_RECT, Color(dst_rect.position.x, dst_rect.position.y, dst_rect.size.x, dst_rect.size.y));
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::SRC_RECT, Color(0, 0, 1, 1));
+
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ } else {
+
+ bool untile = false;
+
+ if (r->flags & CANVAS_RECT_TILE && !(tex->flags & VS::TEXTURE_FLAG_REPEAT)) {
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ untile = true;
+ }
+
+ Size2 texpixel_size(1.0 / tex->width, 1.0 / tex->height);
+ Rect2 src_rect = (r->flags & CANVAS_RECT_REGION) ? Rect2(r->source.position * texpixel_size, r->source.size * texpixel_size) : Rect2(0, 0, 1, 1);
+
+ Rect2 dst_rect = Rect2(r->rect.position, r->rect.size);
+
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::COLOR_TEXPIXEL_SIZE, texpixel_size);
+
+ if (dst_rect.size.width < 0) {
+ dst_rect.position.x += dst_rect.size.width;
+ dst_rect.size.width *= -1;
+ }
+ if (dst_rect.size.height < 0) {
+ dst_rect.position.y += dst_rect.size.height;
+ dst_rect.size.height *= -1;
+ }
+
+ if (r->flags & CANVAS_RECT_FLIP_H) {
+ src_rect.size.x *= -1;
+ }
+
+ if (r->flags & CANVAS_RECT_FLIP_V) {
+ src_rect.size.y *= -1;
+ }
+
+ if (r->flags & CANVAS_RECT_TRANSPOSE) {
+ dst_rect.size.x *= -1; // Encoding in the dst_rect.z uniform
+ }
+
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::COLOR_TEXPIXEL_SIZE, texpixel_size);
+
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::DST_RECT, Color(dst_rect.position.x, dst_rect.position.y, dst_rect.size.x, dst_rect.size.y));
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::SRC_RECT, Color(src_rect.position.x, src_rect.position.y, src_rect.size.x, src_rect.size.y));
+
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+
+ if (untile) {
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ }
+ }
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+
+ } break;
+
+ case Item::Command::TYPE_NINEPATCH: {
+
+ Item::CommandNinePatch *np = static_cast<Item::CommandNinePatch *>(command);
+
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, false);
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_UV_ATTRIBUTE, true);
+ if (state.canvas_shader.bind())
+ _set_uniforms();
+
+ glDisableVertexAttribArray(VS::ARRAY_COLOR);
+ glVertexAttrib4fv(VS::ARRAY_COLOR, np->color.components);
+
+ RasterizerStorageGLES2::Texture *tex = _bind_canvas_texture(np->texture, np->normal_map);
+
+ if (!tex) {
+ print_line("TODO: ninepatch without texture");
+ continue;
+ }
+
+ Size2 texpixel_size(1.0 / tex->width, 1.0 / tex->height);
+
+ // state.canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX, state.uniforms.modelview_matrix);
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::COLOR_TEXPIXEL_SIZE, texpixel_size);
+
+ // prepare vertex buffer
+
+ float buffer[16 * 2 + 16 * 2];
+
+ {
+
+ // first row
+
+ buffer[(0 * 4 * 4) + 0] = np->rect.position.x;
+ buffer[(0 * 4 * 4) + 1] = np->rect.position.y;
+
+ buffer[(0 * 4 * 4) + 2] = np->source.position.x * texpixel_size.x;
+ buffer[(0 * 4 * 4) + 3] = np->source.position.y * texpixel_size.y;
+
+ buffer[(0 * 4 * 4) + 4] = np->rect.position.x + np->margin[MARGIN_LEFT];
+ buffer[(0 * 4 * 4) + 5] = np->rect.position.y;
+
+ buffer[(0 * 4 * 4) + 6] = (np->source.position.x + np->margin[MARGIN_LEFT]) * texpixel_size.x;
+ buffer[(0 * 4 * 4) + 7] = np->source.position.y * texpixel_size.y;
+
+ buffer[(0 * 4 * 4) + 8] = np->rect.position.x + np->rect.size.x - np->margin[MARGIN_RIGHT];
+ buffer[(0 * 4 * 4) + 9] = np->rect.position.y;
+
+ buffer[(0 * 4 * 4) + 10] = (np->source.position.x + np->source.size.x - np->margin[MARGIN_RIGHT]) * texpixel_size.x;
+ buffer[(0 * 4 * 4) + 11] = np->source.position.y * texpixel_size.y;
+
+ buffer[(0 * 4 * 4) + 12] = np->rect.position.x + np->rect.size.x;
+ buffer[(0 * 4 * 4) + 13] = np->rect.position.y;
+
+ buffer[(0 * 4 * 4) + 14] = (np->source.position.x + np->source.size.x) * texpixel_size.x;
+ buffer[(0 * 4 * 4) + 15] = np->source.position.y * texpixel_size.y;
+
+ // second row
+
+ buffer[(1 * 4 * 4) + 0] = np->rect.position.x;
+ buffer[(1 * 4 * 4) + 1] = np->rect.position.y + np->margin[MARGIN_TOP];
+
+ buffer[(1 * 4 * 4) + 2] = np->source.position.x * texpixel_size.x;
+ buffer[(1 * 4 * 4) + 3] = (np->source.position.y + np->margin[MARGIN_TOP]) * texpixel_size.y;
+
+ buffer[(1 * 4 * 4) + 4] = np->rect.position.x + np->margin[MARGIN_LEFT];
+ buffer[(1 * 4 * 4) + 5] = np->rect.position.y + np->margin[MARGIN_TOP];
+
+ buffer[(1 * 4 * 4) + 6] = (np->source.position.x + np->margin[MARGIN_LEFT]) * texpixel_size.x;
+ buffer[(1 * 4 * 4) + 7] = (np->source.position.y + np->margin[MARGIN_TOP]) * texpixel_size.y;
+
+ buffer[(1 * 4 * 4) + 8] = np->rect.position.x + np->rect.size.x - np->margin[MARGIN_RIGHT];
+ buffer[(1 * 4 * 4) + 9] = np->rect.position.y + np->margin[MARGIN_TOP];
+
+ buffer[(1 * 4 * 4) + 10] = (np->source.position.x + np->source.size.x - np->margin[MARGIN_RIGHT]) * texpixel_size.x;
+ buffer[(1 * 4 * 4) + 11] = (np->source.position.y + np->margin[MARGIN_TOP]) * texpixel_size.y;
+
+ buffer[(1 * 4 * 4) + 12] = np->rect.position.x + np->rect.size.x;
+ buffer[(1 * 4 * 4) + 13] = np->rect.position.y + np->margin[MARGIN_TOP];
+
+ buffer[(1 * 4 * 4) + 14] = (np->source.position.x + np->source.size.x) * texpixel_size.x;
+ buffer[(1 * 4 * 4) + 15] = (np->source.position.y + np->margin[MARGIN_TOP]) * texpixel_size.y;
+
+ // thrid row
+
+ buffer[(2 * 4 * 4) + 0] = np->rect.position.x;
+ buffer[(2 * 4 * 4) + 1] = np->rect.position.y + np->rect.size.y - np->margin[MARGIN_BOTTOM];
+
+ buffer[(2 * 4 * 4) + 2] = np->source.position.x * texpixel_size.x;
+ buffer[(2 * 4 * 4) + 3] = (np->source.position.y + np->source.size.y - np->margin[MARGIN_BOTTOM]) * texpixel_size.y;
+
+ buffer[(2 * 4 * 4) + 4] = np->rect.position.x + np->margin[MARGIN_LEFT];
+ buffer[(2 * 4 * 4) + 5] = np->rect.position.y + np->rect.size.y - np->margin[MARGIN_BOTTOM];
+
+ buffer[(2 * 4 * 4) + 6] = (np->source.position.x + np->margin[MARGIN_LEFT]) * texpixel_size.x;
+ buffer[(2 * 4 * 4) + 7] = (np->source.position.y + np->source.size.y - np->margin[MARGIN_BOTTOM]) * texpixel_size.y;
+
+ buffer[(2 * 4 * 4) + 8] = np->rect.position.x + np->rect.size.x - np->margin[MARGIN_RIGHT];
+ buffer[(2 * 4 * 4) + 9] = np->rect.position.y + np->rect.size.y - np->margin[MARGIN_BOTTOM];
+
+ buffer[(2 * 4 * 4) + 10] = (np->source.position.x + np->source.size.x - np->margin[MARGIN_RIGHT]) * texpixel_size.x;
+ buffer[(2 * 4 * 4) + 11] = (np->source.position.y + np->source.size.y - np->margin[MARGIN_BOTTOM]) * texpixel_size.y;
+
+ buffer[(2 * 4 * 4) + 12] = np->rect.position.x + np->rect.size.x;
+ buffer[(2 * 4 * 4) + 13] = np->rect.position.y + np->rect.size.y - np->margin[MARGIN_BOTTOM];
+
+ buffer[(2 * 4 * 4) + 14] = (np->source.position.x + np->source.size.x) * texpixel_size.x;
+ buffer[(2 * 4 * 4) + 15] = (np->source.position.y + np->source.size.y - np->margin[MARGIN_BOTTOM]) * texpixel_size.y;
+
+ // fourth row
+
+ buffer[(3 * 4 * 4) + 0] = np->rect.position.x;
+ buffer[(3 * 4 * 4) + 1] = np->rect.position.y + np->rect.size.y;
+
+ buffer[(3 * 4 * 4) + 2] = np->source.position.x * texpixel_size.x;
+ buffer[(3 * 4 * 4) + 3] = (np->source.position.y + np->source.size.y) * texpixel_size.y;
+
+ buffer[(3 * 4 * 4) + 4] = np->rect.position.x + np->margin[MARGIN_LEFT];
+ buffer[(3 * 4 * 4) + 5] = np->rect.position.y + np->rect.size.y;
+
+ buffer[(3 * 4 * 4) + 6] = (np->source.position.x + np->margin[MARGIN_LEFT]) * texpixel_size.x;
+ buffer[(3 * 4 * 4) + 7] = (np->source.position.y + np->source.size.y) * texpixel_size.y;
+
+ buffer[(3 * 4 * 4) + 8] = np->rect.position.x + np->rect.size.x - np->margin[MARGIN_RIGHT];
+ buffer[(3 * 4 * 4) + 9] = np->rect.position.y + np->rect.size.y;
+
+ buffer[(3 * 4 * 4) + 10] = (np->source.position.x + np->source.size.x - np->margin[MARGIN_RIGHT]) * texpixel_size.x;
+ buffer[(3 * 4 * 4) + 11] = (np->source.position.y + np->source.size.y) * texpixel_size.y;
+
+ buffer[(3 * 4 * 4) + 12] = np->rect.position.x + np->rect.size.x;
+ buffer[(3 * 4 * 4) + 13] = np->rect.position.y + np->rect.size.y;
+
+ buffer[(3 * 4 * 4) + 14] = (np->source.position.x + np->source.size.x) * texpixel_size.x;
+ buffer[(3 * 4 * 4) + 15] = (np->source.position.y + np->source.size.y) * texpixel_size.y;
+
+ // print_line(String::num((np->source.position.y + np->source.size.y) * texpixel_size.y));
+ }
+
+ glBindBuffer(GL_ARRAY_BUFFER, data.ninepatch_vertices);
+ glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(float) * (16 + 16) * 2, buffer);
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, data.ninepatch_elements);
+
+ glEnableVertexAttribArray(VS::ARRAY_VERTEX);
+ glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
+
+ glVertexAttribPointer(VS::ARRAY_VERTEX, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), NULL);
+ glVertexAttribPointer(VS::ARRAY_TEX_UV, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (uint8_t *)0 + (sizeof(float) * 2));
+
+ glDrawElements(GL_TRIANGLES, 18 * 3 - (np->draw_center ? 0 : 6), GL_UNSIGNED_BYTE, NULL);
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+
+ } break;
+
+ case Item::Command::TYPE_CIRCLE: {
+
+ Item::CommandCircle *circle = static_cast<Item::CommandCircle *>(command);
+
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, false);
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_UV_ATTRIBUTE, false);
+
+ if (state.canvas_shader.bind())
+ _set_uniforms();
+
+ static const int num_points = 32;
+
+ Vector2 points[num_points + 1];
+ points[num_points] = circle->pos;
+
+ int indices[num_points * 3];
+
+ for (int i = 0; i < num_points; i++) {
+ points[i] = circle->pos + Vector2(Math::sin(i * Math_PI * 2.0 / num_points), Math::cos(i * Math_PI * 2.0 / num_points)) * circle->radius;
+ indices[i * 3 + 0] = i;
+ indices[i * 3 + 1] = (i + 1) % num_points;
+ indices[i * 3 + 2] = num_points;
+ }
+
+ _bind_canvas_texture(RID(), RID());
+
+ _draw_polygon(indices, num_points * 3, num_points + 1, points, NULL, &circle->color, true);
+ } break;
+
+ case Item::Command::TYPE_POLYGON: {
+
+ Item::CommandPolygon *polygon = static_cast<Item::CommandPolygon *>(command);
+
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, false);
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_UV_ATTRIBUTE, true);
+
+ if (state.canvas_shader.bind())
+ _set_uniforms();
+
+ RasterizerStorageGLES2::Texture *texture = _bind_canvas_texture(polygon->texture, polygon->normal_map);
+
+ if (texture) {
+ Size2 texpixel_size(1.0 / texture->width, 1.0 / texture->height);
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::COLOR_TEXPIXEL_SIZE, texpixel_size);
+ }
+
+ _draw_polygon(polygon->indices.ptr(), polygon->count, polygon->points.size(), polygon->points.ptr(), polygon->uvs.ptr(), polygon->colors.ptr(), polygon->colors.size() == 1);
+ } break;
+
+ case Item::Command::TYPE_POLYLINE: {
+ Item::CommandPolyLine *pline = static_cast<Item::CommandPolyLine *>(command);
+
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, false);
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_UV_ATTRIBUTE, false);
+
+ if (state.canvas_shader.bind())
+ _set_uniforms();
+
+ if (pline->triangles.size()) {
+ _draw_generic(GL_TRIANGLE_STRIP, pline->triangles.size(), pline->triangles.ptr(), NULL, pline->triangle_colors.ptr(), pline->triangle_colors.size() == 1);
+ } else {
+ if (pline->multiline) {
+ int todo = pline->lines.size() / 2;
+ int max_per_call = data.polygon_buffer_size / (sizeof(real_t) * 4);
+ int offset = 0;
+
+ while (todo) {
+ int to_draw = MIN(max_per_call, todo);
+ _draw_generic(GL_LINES, to_draw * 2, &pline->lines.ptr()[offset], NULL, pline->line_colors.size() == 1 ? pline->line_colors.ptr() : &pline->line_colors.ptr()[offset], pline->line_colors.size() == 1);
+ todo -= to_draw;
+ offset += to_draw * 2;
+ }
+ } else {
+ _draw_generic(GL_LINES, pline->lines.size(), pline->lines.ptr(), NULL, pline->line_colors.ptr(), pline->line_colors.size() == 1);
+ }
+ }
+ } break;
+
+ case Item::Command::TYPE_PRIMITIVE: {
+
+ Item::CommandPrimitive *primitive = static_cast<Item::CommandPrimitive *>(command);
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, false);
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_UV_ATTRIBUTE, true);
+
+ if (state.canvas_shader.bind())
+ _set_uniforms();
+
+ ERR_CONTINUE(primitive->points.size() < 1);
+
+ RasterizerStorageGLES2::Texture *texture = _bind_canvas_texture(primitive->texture, primitive->normal_map);
+
+ if (texture) {
+ Size2 texpixel_size(1.0 / texture->width, 1.0 / texture->height);
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::COLOR_TEXPIXEL_SIZE, texpixel_size);
+ }
+
+ if (primitive->colors.size() == 1 && primitive->points.size() > 1) {
+ Color c = primitive->colors[0];
+ glVertexAttrib4f(VS::ARRAY_COLOR, c.r, c.g, c.b, c.a);
+ } else if (primitive->colors.empty()) {
+ glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1);
+ }
+
+ _draw_gui_primitive(primitive->points.size(), primitive->points.ptr(), primitive->colors.ptr(), primitive->uvs.ptr());
+ } break;
+
+ case Item::Command::TYPE_TRANSFORM: {
+ Item::CommandTransform *transform = static_cast<Item::CommandTransform *>(command);
+ state.uniforms.extra_matrix = transform->xform;
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX, state.uniforms.extra_matrix);
+ } break;
+
+ case Item::Command::TYPE_PARTICLES: {
+
+ } break;
+
+ case Item::Command::TYPE_CLIP_IGNORE: {
+
+ Item::CommandClipIgnore *ci = static_cast<Item::CommandClipIgnore *>(command);
+ if (current_clip) {
+ if (ci->ignore != reclip) {
+ if (ci->ignore) {
+ glDisable(GL_SCISSOR_TEST);
+ reclip = true;
+ } else {
+ glEnable(GL_SCISSOR_TEST);
+
+ int x = current_clip->final_clip_rect.position.x;
+ int y = storage->frame.current_rt->height - (current_clip->final_clip_rect.position.y + current_clip->final_clip_rect.size.y);
+ int w = current_clip->final_clip_rect.size.x;
+ int h = current_clip->final_clip_rect.size.y;
+
+ glScissor(x, y, w, h);
+
+ reclip = false;
+ }
+ }
+ }
+
+ } break;
+
+ default: {
+ print_line("other");
+ } break;
+ }
+ }
+}
+
+void RasterizerCanvasGLES2::_copy_texscreen(const Rect2 &p_rect) {
+
+ // This isn't really working yet, so disabling for now.
+
+ /*
+ glDisable(GL_BLEND);
+
+ state.canvas_texscreen_used = true;
+
+ Vector2 wh(storage->frame.current_rt->width, storage->frame.current_rt->height);
+ Color copy_section(p_rect.position.x / wh.x, p_rect.position.y / wh.y, p_rect.size.x / wh.x, p_rect.size.y / wh.y);
+
+ if (p_rect != Rect2()) {
+ // only use section
+
+ storage->shaders.copy.set_conditional(CopyShaderGLES2::USE_COPY_SECTION, true);
+ }
+
+
+ storage->shaders.copy.bind();
+ storage->shaders.copy.set_uniform(CopyShaderGLES2::COPY_SECTION, copy_section);
+
+ _bind_quad_buffer();
+
+ glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->copy_screen_effect.fbo);
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->color);
+
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ glDisableVertexAttribArray(VS::ARRAY_VERTEX);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+
+ glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->fbo);
+
+ state.canvas_shader.bind();
+ _bind_canvas_texture(state.current_tex, state.current_normal);
+
+ glEnable(GL_BLEND);
+ */
+}
+
+void RasterizerCanvasGLES2::canvas_render_items(Item *p_item_list, int p_z, const Color &p_modulate, Light *p_light, const Transform2D &p_base_transform) {
+
+ Item *current_clip = NULL;
+
+ RasterizerStorageGLES2::Shader *shader_cache = NULL;
+
+ bool rebind_shader = true;
+
+ Size2 rt_size = Size2(storage->frame.current_rt->width, storage->frame.current_rt->height);
+
+ state.current_tex = RID();
+ state.current_tex_ptr = NULL;
+ state.current_normal = RID();
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, storage->resources.white_tex);
+
+ int last_blend_mode = -1;
+
+ RID canvas_last_material = RID();
+
+ while (p_item_list) {
+
+ Item *ci = p_item_list;
+
+ if (current_clip != ci->final_clip_owner) {
+
+ current_clip = ci->final_clip_owner;
+
+ if (current_clip) {
+ glEnable(GL_SCISSOR_TEST);
+ glScissor(current_clip->final_clip_rect.position.x, (rt_size.height - (current_clip->final_clip_rect.position.y + current_clip->final_clip_rect.size.height)), current_clip->final_clip_rect.size.width, current_clip->final_clip_rect.size.height);
+ } else {
+ glDisable(GL_SCISSOR_TEST);
+ }
+ }
+
+ // TODO: copy back buffer
+
+ if (ci->copy_back_buffer) {
+ if (ci->copy_back_buffer->full) {
+ _copy_texscreen(Rect2());
+ } else {
+ _copy_texscreen(ci->copy_back_buffer->rect);
+ }
+ }
+
+ Item *material_owner = ci->material_owner ? ci->material_owner : ci;
+
+ RID material = material_owner->material;
+
+ if (material != canvas_last_material || rebind_shader) {
+
+ RasterizerStorageGLES2::Material *material_ptr = storage->material_owner.getornull(material);
+ RasterizerStorageGLES2::Shader *shader_ptr = NULL;
+
+ if (material_ptr) {
+ shader_ptr = material_ptr->shader;
+
+ if (shader_ptr && shader_ptr->mode != VS::SHADER_CANVAS_ITEM) {
+ shader_ptr = NULL; // not a canvas item shader, don't use.
+ }
+ }
+
+ if (shader_ptr) {
+ if (shader_ptr->canvas_item.uses_screen_texture) {
+ _copy_texscreen(Rect2());
+ }
+
+ if (shader_ptr != shader_cache) {
+
+ if (shader_ptr->canvas_item.uses_time) {
+ VisualServerRaster::redraw_request();
+ }
+
+ state.canvas_shader.set_custom_shader(shader_ptr->custom_code_id);
+ state.canvas_shader.bind();
+ }
+
+ int tc = material_ptr->textures.size();
+ RID *textures = material_ptr->textures.ptrw();
+
+ ShaderLanguage::ShaderNode::Uniform::Hint *texture_hints = shader_ptr->texture_hints.ptrw();
+
+ for (int i = 0; i < tc; i++) {
+
+ glActiveTexture(GL_TEXTURE2 + i);
+
+ RasterizerStorageGLES2::Texture *t = storage->texture_owner.getornull(textures[i]);
+
+ if (!t) {
+
+ switch (texture_hints[i]) {
+ case ShaderLanguage::ShaderNode::Uniform::HINT_BLACK_ALBEDO:
+ case ShaderLanguage::ShaderNode::Uniform::HINT_BLACK: {
+ glBindTexture(GL_TEXTURE_2D, storage->resources.black_tex);
+ } break;
+ case ShaderLanguage::ShaderNode::Uniform::HINT_ANISO: {
+ glBindTexture(GL_TEXTURE_2D, storage->resources.aniso_tex);
+ } break;
+ case ShaderLanguage::ShaderNode::Uniform::HINT_NORMAL: {
+ glBindTexture(GL_TEXTURE_2D, storage->resources.normal_tex);
+ } break;
+ default: {
+ glBindTexture(GL_TEXTURE_2D, storage->resources.white_tex);
+ } break;
+ }
+
+ continue;
+ }
+
+ t = t->get_ptr();
+
+ glBindTexture(t->target, t->tex_id);
+ }
+ } else {
+ state.canvas_shader.set_custom_shader(0);
+ state.canvas_shader.bind();
+ }
+
+ shader_cache = shader_ptr;
+
+ canvas_last_material = material;
+
+ rebind_shader = false;
+ }
+
+ int blend_mode = shader_cache ? shader_cache->canvas_item.blend_mode : RasterizerStorageGLES2::Shader::CanvasItem::BLEND_MODE_MIX;
+ bool unshaded = true || (shader_cache && blend_mode != RasterizerStorageGLES2::Shader::CanvasItem::BLEND_MODE_MIX);
+ bool reclip = false;
+
+ if (last_blend_mode != blend_mode) {
+
+ switch (blend_mode) {
+
+ case RasterizerStorageGLES2::Shader::CanvasItem::BLEND_MODE_MIX: {
+ glBlendEquation(GL_FUNC_ADD);
+ if (storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) {
+ glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ } else {
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ }
+
+ } break;
+ case RasterizerStorageGLES2::Shader::CanvasItem::BLEND_MODE_ADD: {
+
+ glBlendEquation(GL_FUNC_ADD);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+
+ } break;
+ case RasterizerStorageGLES2::Shader::CanvasItem::BLEND_MODE_SUB: {
+
+ glBlendEquation(GL_FUNC_REVERSE_SUBTRACT);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+ } break;
+ case RasterizerStorageGLES2::Shader::CanvasItem::BLEND_MODE_MUL: {
+ glBlendEquation(GL_FUNC_ADD);
+ glBlendFunc(GL_DST_COLOR, GL_ZERO);
+ } break;
+ case RasterizerStorageGLES2::Shader::CanvasItem::BLEND_MODE_PMALPHA: {
+ glBlendEquation(GL_FUNC_ADD);
+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ } break;
+ }
+ }
+
+ state.uniforms.final_modulate = unshaded ? ci->final_modulate : Color(ci->final_modulate.r * p_modulate.r, ci->final_modulate.g * p_modulate.g, ci->final_modulate.b * p_modulate.b, ci->final_modulate.a * p_modulate.a);
+
+ state.uniforms.modelview_matrix = ci->final_transform;
+ state.uniforms.extra_matrix = Transform2D();
+
+ _set_uniforms();
+
+ _canvas_item_render_commands(p_item_list, NULL, reclip);
+
+ rebind_shader = true; // hacked in for now.
+
+ if (reclip) {
+ glEnable(GL_SCISSOR_TEST);
+ glScissor(current_clip->final_clip_rect.position.x, (rt_size.height - (current_clip->final_clip_rect.position.y + current_clip->final_clip_rect.size.height)), current_clip->final_clip_rect.size.width, current_clip->final_clip_rect.size.height);
+ }
+
+ p_item_list = p_item_list->next;
+ }
+
+ if (current_clip) {
+ glDisable(GL_SCISSOR_TEST);
+ }
+}
+
+void RasterizerCanvasGLES2::canvas_debug_viewport_shadows(Light *p_lights_with_shadow) {
+}
+
+void RasterizerCanvasGLES2::canvas_light_shadow_buffer_update(RID p_buffer, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders, CameraMatrix *p_xform_cache) {
+}
+
+void RasterizerCanvasGLES2::reset_canvas() {
+
+ glDisable(GL_CULL_FACE);
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_SCISSOR_TEST);
+ glDisable(GL_DITHER);
+ glEnable(GL_BLEND);
+
+ if (storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) {
+ glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ } else {
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ }
+
+ // bind the back buffer to a texture so shaders can use it.
+ // It should probably use texture unit -3 (as GLES3 does as well) but currently that's buggy.
+ // keeping this for now as there's nothing else that uses texture unit 2
+ // TODO ^
+ if (storage->frame.current_rt) {
+ glActiveTexture(GL_TEXTURE0 + 2);
+ glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->copy_screen_effect.color);
+ }
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+}
+
+void RasterizerCanvasGLES2::_bind_quad_buffer() {
+ glBindBuffer(GL_ARRAY_BUFFER, data.canvas_quad_vertices);
+ glEnableVertexAttribArray(VS::ARRAY_VERTEX);
+ glVertexAttribPointer(VS::ARRAY_VERTEX, 2, GL_FLOAT, GL_FALSE, 0, NULL);
+}
+void RasterizerCanvasGLES2::draw_generic_textured_rect(const Rect2 &p_rect, const Rect2 &p_src) {
+
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::DST_RECT, Color(p_rect.position.x, p_rect.position.y, p_rect.size.x, p_rect.size.y));
+ state.canvas_shader.set_uniform(CanvasShaderGLES2::SRC_RECT, Color(p_src.position.x, p_src.position.y, p_src.size.x, p_src.size.y));
+
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+}
+
+void RasterizerCanvasGLES2::draw_window_margins(int *black_margin, RID *black_image) {
+}
+
+void RasterizerCanvasGLES2::initialize() {
+
+ // quad buffer
+ {
+ glGenBuffers(1, &data.canvas_quad_vertices);
+ glBindBuffer(GL_ARRAY_BUFFER, data.canvas_quad_vertices);
+
+ const float qv[8] = {
+ 0, 0,
+ 0, 1,
+ 1, 1,
+ 1, 0
+ };
+
+ glBufferData(GL_ARRAY_BUFFER, sizeof(float) * 8, qv, GL_STATIC_DRAW);
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+ }
+
+ // polygon buffer
+ {
+ uint32_t poly_size = GLOBAL_DEF("rendering/limits/buffers/canvas_polygon_buffer_size_kb", 128);
+ poly_size *= 1024;
+ poly_size = MAX(poly_size, (2 + 2 + 4) * 4 * sizeof(float));
+ glGenBuffers(1, &data.polygon_buffer);
+ glBindBuffer(GL_ARRAY_BUFFER, data.polygon_buffer);
+ glBufferData(GL_ARRAY_BUFFER, poly_size, NULL, GL_DYNAMIC_DRAW);
+
+ data.polygon_buffer_size = poly_size;
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+
+ uint32_t index_size = GLOBAL_DEF("rendering/limits/buffers/canvas_polygon_index_size_kb", 128);
+ index_size *= 1024; // kb
+ glGenBuffers(1, &data.polygon_index_buffer);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, data.polygon_index_buffer);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, index_size, NULL, GL_DYNAMIC_DRAW);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+ }
+
+ // ninepatch buffers
+ {
+ // array buffer
+ glGenBuffers(1, &data.ninepatch_vertices);
+ glBindBuffer(GL_ARRAY_BUFFER, data.ninepatch_vertices);
+
+ glBufferData(GL_ARRAY_BUFFER, sizeof(float) * (16 + 16) * 2, NULL, GL_DYNAMIC_DRAW);
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+
+ // element buffer
+ glGenBuffers(1, &data.ninepatch_elements);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, data.ninepatch_elements);
+
+#define _EIDX(y, x) (y * 4 + x)
+ uint8_t elems[3 * 2 * 9] = {
+
+ // first row
+
+ _EIDX(0, 0), _EIDX(0, 1), _EIDX(1, 1),
+ _EIDX(1, 1), _EIDX(1, 0), _EIDX(0, 0),
+
+ _EIDX(0, 1), _EIDX(0, 2), _EIDX(1, 2),
+ _EIDX(1, 2), _EIDX(1, 1), _EIDX(0, 1),
+
+ _EIDX(0, 2), _EIDX(0, 3), _EIDX(1, 3),
+ _EIDX(1, 3), _EIDX(1, 2), _EIDX(0, 2),
+
+ // second row
+
+ _EIDX(1, 0), _EIDX(1, 1), _EIDX(2, 1),
+ _EIDX(2, 1), _EIDX(2, 0), _EIDX(1, 0),
+
+ // the center one would be here, but we'll put it at the end
+ // so it's easier to disable the center and be able to use
+ // one draw call for both
+
+ _EIDX(1, 2), _EIDX(1, 3), _EIDX(2, 3),
+ _EIDX(2, 3), _EIDX(2, 2), _EIDX(1, 2),
+
+ // third row
+
+ _EIDX(2, 0), _EIDX(2, 1), _EIDX(3, 1),
+ _EIDX(3, 1), _EIDX(3, 0), _EIDX(2, 0),
+
+ _EIDX(2, 1), _EIDX(2, 2), _EIDX(3, 2),
+ _EIDX(3, 2), _EIDX(3, 1), _EIDX(2, 1),
+
+ _EIDX(2, 2), _EIDX(2, 3), _EIDX(3, 3),
+ _EIDX(3, 3), _EIDX(3, 2), _EIDX(2, 2),
+
+ // center field
+
+ _EIDX(1, 1), _EIDX(1, 2), _EIDX(2, 2),
+ _EIDX(2, 2), _EIDX(2, 1), _EIDX(1, 1)
+ };
+ ;
+#undef _EIDX
+
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(elems), elems, GL_STATIC_DRAW);
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+ }
+
+ state.canvas_shader.init();
+
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, true);
+
+ state.canvas_shader.bind();
+}
+
+void RasterizerCanvasGLES2::finalize() {
+}
+
+RasterizerCanvasGLES2::RasterizerCanvasGLES2() {
+}
diff --git a/drivers/gles2/rasterizer_canvas_gles2.h b/drivers/gles2/rasterizer_canvas_gles2.h
new file mode 100644
index 0000000000..06dcc57df4
--- /dev/null
+++ b/drivers/gles2/rasterizer_canvas_gles2.h
@@ -0,0 +1,129 @@
+/*************************************************************************/
+/* rasterizer_canvas_gles2.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 RASTERIZERCANVASGLES2_H
+#define RASTERIZERCANVASGLES2_H
+
+#include "rasterizer_storage_gles2.h"
+#include "servers/visual/rasterizer.h"
+
+#include "shaders/canvas.glsl.gen.h"
+
+// #include "shaders/canvas_shadow.glsl.gen.h"
+
+class RasterizerSceneGLES2;
+
+class RasterizerCanvasGLES2 : public RasterizerCanvas {
+public:
+ struct Uniforms {
+ Transform projection_matrix;
+
+ Transform2D modelview_matrix;
+ Transform2D extra_matrix;
+
+ Color final_modulate;
+
+ float time;
+ };
+
+ struct Data {
+
+ GLuint canvas_quad_vertices;
+ GLuint polygon_buffer;
+ GLuint polygon_index_buffer;
+
+ uint32_t polygon_buffer_size;
+
+ GLuint ninepatch_vertices;
+ GLuint ninepatch_elements;
+
+ } data;
+
+ struct State {
+ Uniforms uniforms;
+ bool canvas_texscreen_used;
+ CanvasShaderGLES2 canvas_shader;
+ // CanvasShadowShaderGLES3 canvas_shadow_shader;
+
+ bool using_texture_rect;
+ bool using_ninepatch;
+
+ RID current_tex;
+ RID current_normal;
+ RasterizerStorageGLES2::Texture *current_tex_ptr;
+
+ Transform vp;
+
+ } state;
+
+ typedef void Texture;
+
+ RasterizerSceneGLES2 *scene_render;
+
+ RasterizerStorageGLES2 *storage;
+
+ virtual RID light_internal_create();
+ virtual void light_internal_update(RID p_rid, Light *p_light);
+ virtual void light_internal_free(RID p_rid);
+
+ void _set_uniforms();
+
+ virtual void canvas_begin();
+ virtual void canvas_end();
+
+ _FORCE_INLINE_ void _set_texture_rect_mode(bool p_enable, bool p_ninepatch = false);
+
+ _FORCE_INLINE_ void _draw_gui_primitive(int p_points, const Vector2 *p_vertices, const Color *p_colors, const Vector2 *p_uvs);
+ _FORCE_INLINE_ void _draw_polygon(const int *p_indices, int p_index_count, int p_vertex_count, const Vector2 *p_vertices, const Vector2 *p_uvs, const Color *p_colors, bool p_singlecolor);
+ _FORCE_INLINE_ void _draw_generic(GLuint p_primitive, int p_vertex_count, const Vector2 *p_vertices, const Vector2 *p_uvs, const Color *p_colors, bool p_singlecolor);
+
+ _FORCE_INLINE_ void _canvas_item_render_commands(Item *p_item, Item *current_clip, bool &reclip);
+ _FORCE_INLINE_ void _copy_texscreen(const Rect2 &p_rect);
+
+ virtual void canvas_render_items(Item *p_item_list, int p_z, const Color &p_modulate, Light *p_light, const Transform2D &p_base_transform);
+ virtual void canvas_debug_viewport_shadows(Light *p_lights_with_shadow);
+
+ virtual void canvas_light_shadow_buffer_update(RID p_buffer, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders, CameraMatrix *p_xform_cache);
+
+ virtual void reset_canvas();
+
+ RasterizerStorageGLES2::Texture *_bind_canvas_texture(const RID &p_texture, const RID &p_normal_map);
+
+ void _bind_quad_buffer();
+ void draw_generic_textured_rect(const Rect2 &p_rect, const Rect2 &p_src);
+
+ void initialize();
+ void finalize();
+
+ virtual void draw_window_margins(int *black_margin, RID *black_image);
+
+ RasterizerCanvasGLES2();
+};
+
+#endif // RASTERIZERCANVASGLES2_H
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
new file mode 100644
index 0000000000..187395d467
--- /dev/null
+++ b/drivers/gles2/rasterizer_gles2.cpp
@@ -0,0 +1,387 @@
+/*************************************************************************/
+/* rasterizer_gles2.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 "rasterizer_gles2.h"
+
+#include "gl_context/context_gl.h"
+#include "os/os.h"
+#include "project_settings.h"
+#include <string.h>
+
+#define _EXT_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
+#define _EXT_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
+#define _EXT_DEBUG_CALLBACK_FUNCTION_ARB 0x8244
+#define _EXT_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245
+#define _EXT_DEBUG_SOURCE_API_ARB 0x8246
+#define _EXT_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
+#define _EXT_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
+#define _EXT_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249
+#define _EXT_DEBUG_SOURCE_APPLICATION_ARB 0x824A
+#define _EXT_DEBUG_SOURCE_OTHER_ARB 0x824B
+#define _EXT_DEBUG_TYPE_ERROR_ARB 0x824C
+#define _EXT_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
+#define _EXT_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
+#define _EXT_DEBUG_TYPE_PORTABILITY_ARB 0x824F
+#define _EXT_DEBUG_TYPE_PERFORMANCE_ARB 0x8250
+#define _EXT_DEBUG_TYPE_OTHER_ARB 0x8251
+#define _EXT_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143
+#define _EXT_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144
+#define _EXT_DEBUG_LOGGED_MESSAGES_ARB 0x9145
+#define _EXT_DEBUG_SEVERITY_HIGH_ARB 0x9146
+#define _EXT_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
+#define _EXT_DEBUG_SEVERITY_LOW_ARB 0x9148
+#define _EXT_DEBUG_OUTPUT 0x92E0
+
+#if (defined WINDOWS_ENABLED) && !(defined UWP_ENABLED)
+#define GLAPIENTRY APIENTRY
+#else
+#define GLAPIENTRY
+#endif
+
+static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const GLvoid *userParam) {
+
+ if (type == _EXT_DEBUG_TYPE_OTHER_ARB)
+ return;
+
+ if (type == _EXT_DEBUG_TYPE_PERFORMANCE_ARB)
+ return; //these are ultimately annoying, so removing for now
+
+ char debSource[256], debType[256], debSev[256];
+ if (source == _EXT_DEBUG_SOURCE_API_ARB)
+ strcpy(debSource, "OpenGL");
+ else if (source == _EXT_DEBUG_SOURCE_WINDOW_SYSTEM_ARB)
+ strcpy(debSource, "Windows");
+ else if (source == _EXT_DEBUG_SOURCE_SHADER_COMPILER_ARB)
+ strcpy(debSource, "Shader Compiler");
+ else if (source == _EXT_DEBUG_SOURCE_THIRD_PARTY_ARB)
+ strcpy(debSource, "Third Party");
+ else if (source == _EXT_DEBUG_SOURCE_APPLICATION_ARB)
+ strcpy(debSource, "Application");
+ else if (source == _EXT_DEBUG_SOURCE_OTHER_ARB)
+ strcpy(debSource, "Other");
+
+ if (type == _EXT_DEBUG_TYPE_ERROR_ARB)
+ strcpy(debType, "Error");
+ else if (type == _EXT_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB)
+ strcpy(debType, "Deprecated behavior");
+ else if (type == _EXT_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB)
+ strcpy(debType, "Undefined behavior");
+ else if (type == _EXT_DEBUG_TYPE_PORTABILITY_ARB)
+ strcpy(debType, "Portability");
+ else if (type == _EXT_DEBUG_TYPE_PERFORMANCE_ARB)
+ strcpy(debType, "Performance");
+ else if (type == _EXT_DEBUG_TYPE_OTHER_ARB)
+ strcpy(debType, "Other");
+
+ if (severity == _EXT_DEBUG_SEVERITY_HIGH_ARB)
+ strcpy(debSev, "High");
+ else if (severity == _EXT_DEBUG_SEVERITY_MEDIUM_ARB)
+ strcpy(debSev, "Medium");
+ else if (severity == _EXT_DEBUG_SEVERITY_LOW_ARB)
+ strcpy(debSev, "Low");
+
+ String output = String() + "GL ERROR: Source: " + debSource + "\tType: " + debType + "\tID: " + itos(id) + "\tSeverity: " + debSev + "\tMessage: " + message;
+
+ ERR_PRINTS(output);
+}
+
+typedef void (*DEBUGPROCARB)(GLenum source,
+ GLenum type,
+ GLuint id,
+ GLenum severity,
+ GLsizei length,
+ const char *message,
+ const void *userParam);
+
+typedef void (*DebugMessageCallbackARB)(DEBUGPROCARB callback, const void *userParam);
+
+RasterizerStorage *RasterizerGLES2::get_storage() {
+
+ return storage;
+}
+
+RasterizerCanvas *RasterizerGLES2::get_canvas() {
+
+ return canvas;
+}
+
+RasterizerScene *RasterizerGLES2::get_scene() {
+
+ return scene;
+}
+
+void RasterizerGLES2::initialize() {
+
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ print_line("Using GLES2 video driver");
+ }
+
+#ifdef GLAD_ENABLED
+ if (!gladLoadGL()) {
+ ERR_PRINT("Error initializing GLAD");
+ }
+
+// GLVersion seems to be used for both GL and GL ES, so we need different version checks for them
+#ifdef OPENGL_ENABLED // OpenGL 3.3 Core Profile required
+ if (GLVersion.major < 3) {
+#else // OpenGL ES 3.0
+ if (GLVersion.major < 2) {
+#endif
+ ERR_PRINT("Your system's graphic drivers seem not to support OpenGL 2.1 / OpenGL ES 2.0, sorry :(\n"
+ "Try a drivers update, buy a new GPU or try software rendering on Linux; Godot will now crash with a segmentation fault.");
+ OS::get_singleton()->alert("Your system's graphic drivers seem not to support OpenGL 2.1 / OpenGL ES 2.0, sorry :(\n"
+ "Godot Engine will self-destruct as soon as you acknowledge this error message.",
+ "Fatal error: Insufficient OpenGL / GLES driver support");
+ }
+
+#ifdef __APPLE__
+// FIXME glDebugMessageCallbackARB does not seem to work on Mac OS X and opengl 2, this may be an issue with our opengl canvas..
+#else
+ if (true || OS::get_singleton()->is_stdout_verbose()) {
+ glEnable(_EXT_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
+ glDebugMessageCallbackARB(_gl_debug_print, NULL);
+ glEnable(_EXT_DEBUG_OUTPUT);
+ }
+#endif
+
+#endif // GLAD_ENABLED
+
+ // For debugging
+#ifdef GLES_OVER_GL
+#ifdef __APPLE__
+// FIXME glDebugMessageCallbackARB does not seem to work on Mac OS X and opengl 2, this may be an issue with our opengl canvas..
+#else
+ glDebugMessageControlARB(_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_ERROR_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0, NULL, GL_TRUE);
+ glDebugMessageControlARB(_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0, NULL, GL_TRUE);
+ glDebugMessageControlARB(_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0, NULL, GL_TRUE);
+ glDebugMessageControlARB(_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_PORTABILITY_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0, NULL, GL_TRUE);
+ glDebugMessageControlARB(_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_PERFORMANCE_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0, NULL, GL_TRUE);
+ glDebugMessageControlARB(_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_OTHER_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0, NULL, GL_TRUE);
+#endif
+#endif
+ /* glDebugMessageInsertARB(
+ GL_DEBUG_SOURCE_API_ARB,
+ GL_DEBUG_TYPE_OTHER_ARB, 1,
+ GL_DEBUG_SEVERITY_HIGH_ARB, 5, "hello");
+ */
+
+ const GLubyte *renderer = glGetString(GL_RENDERER);
+ print_line("OpenGL ES 2.0 Renderer: " + String((const char *)renderer));
+ storage->initialize();
+ canvas->initialize();
+ scene->initialize();
+}
+
+void RasterizerGLES2::begin_frame() {
+ uint64_t tick = OS::get_singleton()->get_ticks_usec();
+
+ double delta = double(tick - prev_ticks) / 1000000.0;
+ delta *= Engine::get_singleton()->get_time_scale();
+
+ time_total += delta;
+
+ if (delta == 0) {
+ //to avoid hiccups
+ delta = 0.001;
+ }
+
+ prev_ticks = tick;
+
+ // double time_roll_over = GLOBAL_GET("rendering/limits/time/time_rollover_secs");
+ // if (time_total > time_roll_over)
+ // time_total = 0; //roll over every day (should be customz
+
+ storage->frame.time[0] = time_total;
+ storage->frame.time[1] = Math::fmod(time_total, 3600);
+ storage->frame.time[2] = Math::fmod(time_total, 900);
+ storage->frame.time[3] = Math::fmod(time_total, 60);
+ storage->frame.count++;
+ storage->frame.delta = delta;
+
+ storage->frame.prev_tick = tick;
+
+ storage->update_dirty_resources();
+
+ storage->info.render_final = storage->info.render;
+ storage->info.render.reset();
+
+ scene->iteration();
+}
+
+void RasterizerGLES2::set_current_render_target(RID p_render_target) {
+
+ if (!p_render_target.is_valid() && storage->frame.current_rt && storage->frame.clear_request) {
+ // pending clear request. Do that first.
+ glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->fbo);
+ glClearColor(storage->frame.clear_request_color.r,
+ storage->frame.clear_request_color.g,
+ storage->frame.clear_request_color.b,
+ storage->frame.clear_request_color.a);
+ glClear(GL_COLOR_BUFFER_BIT);
+ }
+
+ if (p_render_target.is_valid()) {
+ RasterizerStorageGLES2::RenderTarget *rt = storage->render_target_owner.getornull(p_render_target);
+ storage->frame.current_rt = rt;
+ ERR_FAIL_COND(!rt);
+ storage->frame.clear_request = false;
+
+ glViewport(0, 0, rt->width, rt->height);
+ } else {
+ storage->frame.current_rt = NULL;
+ storage->frame.clear_request = false;
+ glViewport(0, 0, OS::get_singleton()->get_window_size().width, OS::get_singleton()->get_window_size().height);
+ glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES2::system_fbo);
+ }
+}
+
+void RasterizerGLES2::restore_render_target() {
+ ERR_FAIL_COND(storage->frame.current_rt == NULL);
+ RasterizerStorageGLES2::RenderTarget *rt = storage->frame.current_rt;
+ glBindFramebuffer(GL_FRAMEBUFFER, rt->fbo);
+ glViewport(0, 0, rt->width, rt->height);
+}
+
+void RasterizerGLES2::clear_render_target(const Color &p_color) {
+ ERR_FAIL_COND(!storage->frame.current_rt);
+
+ storage->frame.clear_request = true;
+ storage->frame.clear_request_color = p_color;
+}
+
+void RasterizerGLES2::set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) {
+
+ if (p_image.is_null() || p_image->empty())
+ return;
+
+ int window_w = OS::get_singleton()->get_video_mode(0).width;
+ int window_h = OS::get_singleton()->get_video_mode(0).height;
+
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glViewport(0, 0, window_w, window_h);
+ glDisable(GL_BLEND);
+ glDepthMask(GL_FALSE);
+ glClearColor(p_color.r, p_color.g, p_color.b, p_color.a);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ canvas->canvas_begin();
+
+ RID texture = storage->texture_create();
+ storage->texture_allocate(texture, p_image->get_width(), p_image->get_height(), p_image->get_format(), VS::TEXTURE_FLAG_FILTER);
+ storage->texture_set_data(texture, p_image);
+
+ Rect2 imgrect(0, 0, p_image->get_width(), p_image->get_height());
+ Rect2 screenrect;
+
+ screenrect = imgrect;
+ screenrect.position += ((Size2(window_w, window_h) - screenrect.size) / 2.0).floor();
+
+ RasterizerStorageGLES2::Texture *t = storage->texture_owner.get(texture);
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, t->tex_id);
+ canvas->draw_generic_textured_rect(screenrect, Rect2(0, 0, 1, 1));
+ glBindTexture(GL_TEXTURE_2D, 0);
+ canvas->canvas_end();
+
+ storage->free(texture);
+
+ OS::get_singleton()->swap_buffers();
+}
+
+void RasterizerGLES2::blit_render_target_to_screen(RID p_render_target, const Rect2 &p_screen_rect, int p_screen) {
+
+ ERR_FAIL_COND(storage->frame.current_rt);
+
+ RasterizerStorageGLES2::RenderTarget *rt = storage->render_target_owner.getornull(p_render_target);
+ ERR_FAIL_COND(!rt);
+
+ canvas->state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, true);
+ canvas->state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_UV_ATTRIBUTE, false);
+
+ canvas->state.canvas_shader.bind();
+
+ canvas->canvas_begin();
+ canvas->state.canvas_shader.set_uniform(CanvasShaderGLES2::BLIT_PASS, true);
+ glDisable(GL_BLEND);
+ glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES2::system_fbo);
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, rt->color);
+
+ // TODO normals
+
+ canvas->draw_generic_textured_rect(p_screen_rect, Rect2(0, 0, 1, -1));
+
+ canvas->state.canvas_shader.set_uniform(CanvasShaderGLES2::BLIT_PASS, false);
+
+ glBindTexture(GL_TEXTURE_2D, 0);
+ canvas->canvas_end();
+}
+
+void RasterizerGLES2::end_frame(bool p_swap_buffers) {
+ if (p_swap_buffers)
+ OS::get_singleton()->swap_buffers();
+ else
+ glFinish();
+}
+
+void RasterizerGLES2::finalize() {
+}
+
+Rasterizer *RasterizerGLES2::_create_current() {
+
+ return memnew(RasterizerGLES2);
+}
+
+void RasterizerGLES2::make_current() {
+ _create_func = _create_current;
+}
+
+void RasterizerGLES2::register_config() {
+}
+
+RasterizerGLES2::RasterizerGLES2() {
+
+ storage = memnew(RasterizerStorageGLES2);
+ canvas = memnew(RasterizerCanvasGLES2);
+ scene = memnew(RasterizerSceneGLES2);
+ canvas->storage = storage;
+ canvas->scene_render = scene;
+ storage->canvas = canvas;
+ scene->storage = storage;
+ storage->scene = scene;
+
+ prev_ticks = 0;
+ time_total = 0;
+}
+
+RasterizerGLES2::~RasterizerGLES2() {
+
+ memdelete(storage);
+ memdelete(canvas);
+}
diff --git a/drivers/gles2/rasterizer_gles2.h b/drivers/gles2/rasterizer_gles2.h
new file mode 100644
index 0000000000..3ab99109cb
--- /dev/null
+++ b/drivers/gles2/rasterizer_gles2.h
@@ -0,0 +1,72 @@
+/*************************************************************************/
+/* rasterizer_gles2.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 RASTERIZERGLES2_H
+#define RASTERIZERGLES2_H
+
+#include "rasterizer_canvas_gles2.h"
+#include "rasterizer_scene_gles2.h"
+#include "rasterizer_storage_gles2.h"
+#include "servers/visual/rasterizer.h"
+
+class RasterizerGLES2 : public Rasterizer {
+
+ static Rasterizer *_create_current();
+
+ RasterizerStorageGLES2 *storage;
+ RasterizerCanvasGLES2 *canvas;
+ RasterizerSceneGLES2 *scene;
+
+ uint64_t prev_ticks;
+ double time_total;
+
+public:
+ virtual RasterizerStorage *get_storage();
+ virtual RasterizerCanvas *get_canvas();
+ virtual RasterizerScene *get_scene();
+
+ virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale);
+
+ virtual void initialize();
+ virtual void begin_frame();
+ virtual void set_current_render_target(RID p_render_target);
+ virtual void restore_render_target();
+ virtual void clear_render_target(const Color &p_color);
+ virtual void blit_render_target_to_screen(RID p_render_target, const Rect2 &p_screen_rect, int p_screen = 0);
+ virtual void end_frame(bool p_swap_buffers);
+ virtual void finalize();
+
+ static void make_current();
+
+ static void register_config();
+ RasterizerGLES2();
+ ~RasterizerGLES2();
+};
+
+#endif // RASTERIZERGLES2_H
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp
new file mode 100644
index 0000000000..1f19e90f4e
--- /dev/null
+++ b/drivers/gles2/rasterizer_scene_gles2.cpp
@@ -0,0 +1,235 @@
+/*************************************************************************/
+/* rasterizer_scene_gles2.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 "rasterizer_scene_gles2.h"
+#include "math_funcs.h"
+#include "os/os.h"
+#include "project_settings.h"
+#include "rasterizer_canvas_gles2.h"
+#include "servers/visual/visual_server_raster.h"
+
+#ifndef GLES_OVER_GL
+#define glClearDepth glClearDepthf
+#endif
+
+/* SHADOW ATLAS API */
+
+RID RasterizerSceneGLES2::shadow_atlas_create() {
+
+ return RID();
+}
+
+void RasterizerSceneGLES2::shadow_atlas_set_size(RID p_atlas, int p_size) {
+}
+
+void RasterizerSceneGLES2::shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) {
+}
+
+bool RasterizerSceneGLES2::shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version) {
+ return false;
+}
+
+void RasterizerSceneGLES2::set_directional_shadow_count(int p_count) {
+}
+
+int RasterizerSceneGLES2::get_directional_light_shadow_size(RID p_light_intance) {
+ return 0;
+}
+//////////////////////////////////////////////////////
+
+RID RasterizerSceneGLES2::reflection_atlas_create() {
+ return RID();
+}
+
+void RasterizerSceneGLES2::reflection_atlas_set_size(RID p_ref_atlas, int p_size) {
+}
+
+void RasterizerSceneGLES2::reflection_atlas_set_subdivision(RID p_ref_atlas, int p_subdiv) {
+}
+
+////////////////////////////////////////////////////
+
+RID RasterizerSceneGLES2::reflection_probe_instance_create(RID p_probe) {
+ return RID();
+}
+
+void RasterizerSceneGLES2::reflection_probe_instance_set_transform(RID p_instance, const Transform &p_transform) {
+}
+
+void RasterizerSceneGLES2::reflection_probe_release_atlas_index(RID p_instance) {
+}
+
+bool RasterizerSceneGLES2::reflection_probe_instance_needs_redraw(RID p_instance) {
+ return false;
+}
+
+bool RasterizerSceneGLES2::reflection_probe_instance_has_reflection(RID p_instance) {
+ return false;
+}
+
+bool RasterizerSceneGLES2::reflection_probe_instance_begin_render(RID p_instance, RID p_reflection_atlas) {
+ return false;
+}
+
+bool RasterizerSceneGLES2::reflection_probe_instance_postprocess_step(RID p_instance) {
+ return false;
+}
+
+/* ENVIRONMENT API */
+
+RID RasterizerSceneGLES2::environment_create() {
+
+ return RID();
+}
+
+void RasterizerSceneGLES2::environment_set_background(RID p_env, VS::EnvironmentBG p_bg) {
+}
+
+void RasterizerSceneGLES2::environment_set_sky(RID p_env, RID p_sky) {
+}
+
+void RasterizerSceneGLES2::environment_set_sky_custom_fov(RID p_env, float p_scale) {
+}
+
+void RasterizerSceneGLES2::environment_set_bg_color(RID p_env, const Color &p_color) {
+}
+
+void RasterizerSceneGLES2::environment_set_bg_energy(RID p_env, float p_energy) {
+}
+
+void RasterizerSceneGLES2::environment_set_canvas_max_layer(RID p_env, int p_max_layer) {
+}
+
+void RasterizerSceneGLES2::environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy, float p_sky_contribution) {
+}
+
+void RasterizerSceneGLES2::environment_set_dof_blur_far(RID p_env, bool p_enable, float p_distance, float p_transition, float p_amount, VS::EnvironmentDOFBlurQuality p_quality) {
+}
+
+void RasterizerSceneGLES2::environment_set_dof_blur_near(RID p_env, bool p_enable, float p_distance, float p_transition, float p_amount, VS::EnvironmentDOFBlurQuality p_quality) {
+}
+
+void RasterizerSceneGLES2::environment_set_glow(RID p_env, bool p_enable, int p_level_flags, float p_intensity, float p_strength, float p_bloom_threshold, VS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, bool p_bicubic_upscale) {
+}
+
+void RasterizerSceneGLES2::environment_set_fog(RID p_env, bool p_enable, float p_begin, float p_end, RID p_gradient_texture) {
+}
+
+void RasterizerSceneGLES2::environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_in, float p_fade_out, float p_depth_tolerance, bool p_roughness) {
+}
+
+void RasterizerSceneGLES2::environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_radius2, float p_intensity2, float p_bias, float p_light_affect, const Color &p_color, VS::EnvironmentSSAOQuality p_quality, VisualServer::EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness) {
+}
+
+void RasterizerSceneGLES2::environment_set_tonemap(RID p_env, VS::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) {
+}
+
+void RasterizerSceneGLES2::environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, RID p_ramp) {
+}
+
+void RasterizerSceneGLES2::environment_set_fog(RID p_env, bool p_enable, const Color &p_color, const Color &p_sun_color, float p_sun_amount) {
+}
+
+void RasterizerSceneGLES2::environment_set_fog_depth(RID p_env, bool p_enable, float p_depth_begin, float p_depth_curve, bool p_transmit, float p_transmit_curve) {
+}
+
+void RasterizerSceneGLES2::environment_set_fog_height(RID p_env, bool p_enable, float p_min_height, float p_max_height, float p_height_curve) {
+}
+
+bool RasterizerSceneGLES2::is_environment(RID p_env) {
+ return false;
+}
+
+VS::EnvironmentBG RasterizerSceneGLES2::environment_get_background(RID p_env) {
+ return VS::ENV_BG_CLEAR_COLOR;
+}
+
+int RasterizerSceneGLES2::environment_get_canvas_max_layer(RID p_env) {
+ return 0;
+}
+
+RID RasterizerSceneGLES2::light_instance_create(RID p_light) {
+ return RID();
+}
+
+void RasterizerSceneGLES2::light_instance_set_transform(RID p_light_instance, const Transform &p_transform) {
+}
+
+void RasterizerSceneGLES2::light_instance_set_shadow_transform(RID p_light_instance, const CameraMatrix &p_projection, const Transform &p_transform, float p_far, float p_split, int p_pass, float p_bias_scale) {
+}
+
+void RasterizerSceneGLES2::light_instance_mark_visible(RID p_light_instance) {
+}
+
+//////////////////////
+
+RID RasterizerSceneGLES2::gi_probe_instance_create() {
+
+ return RID();
+}
+
+void RasterizerSceneGLES2::gi_probe_instance_set_light_data(RID p_probe, RID p_base, RID p_data) {
+}
+void RasterizerSceneGLES2::gi_probe_instance_set_transform_to_data(RID p_probe, const Transform &p_xform) {
+}
+
+void RasterizerSceneGLES2::gi_probe_instance_set_bounds(RID p_probe, const Vector3 &p_bounds) {
+}
+
+////////////////////////////
+////////////////////////////
+////////////////////////////
+
+void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, InstanceBase **p_cull_result, int p_cull_count, RID *p_light_cull_result, int p_light_cull_count, RID *p_reflection_probe_cull_result, int p_reflection_probe_cull_count, RID p_environment, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass) {
+}
+
+void RasterizerSceneGLES2::render_shadow(RID p_light, RID p_shadow_atlas, int p_pass, InstanceBase **p_cull_result, int p_cull_count) {
+}
+
+void RasterizerSceneGLES2::set_scene_pass(uint64_t p_pass) {
+}
+
+bool RasterizerSceneGLES2::free(RID p_rid) {
+ return true;
+}
+
+void RasterizerSceneGLES2::set_debug_draw_mode(VS::ViewportDebugDraw p_debug_draw) {
+}
+
+void RasterizerSceneGLES2::initialize() {
+}
+
+void RasterizerSceneGLES2::iteration() {
+}
+
+void RasterizerSceneGLES2::finalize() {
+}
+
+RasterizerSceneGLES2::RasterizerSceneGLES2() {
+}
diff --git a/drivers/gles2/rasterizer_scene_gles2.h b/drivers/gles2/rasterizer_scene_gles2.h
new file mode 100644
index 0000000000..723accbb3b
--- /dev/null
+++ b/drivers/gles2/rasterizer_scene_gles2.h
@@ -0,0 +1,258 @@
+/*************************************************************************/
+/* rasterizer_scene_gles2.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 RASTERIZERSCENEGLES2_H
+#define RASTERIZERSCENEGLES2_H
+
+/* Must come before shaders or the Windows build fails... */
+#include "rasterizer_storage_gles2.h"
+
+#include "shaders/scene.glsl.gen.h"
+/*
+
+#include "drivers/gles3/shaders/cube_to_dp.glsl.gen.h"
+#include "drivers/gles3/shaders/effect_blur.glsl.gen.h"
+#include "drivers/gles3/shaders/exposure.glsl.gen.h"
+#include "drivers/gles3/shaders/resolve.glsl.gen.h"
+#include "drivers/gles3/shaders/scene.glsl.gen.h"
+#include "drivers/gles3/shaders/screen_space_reflection.glsl.gen.h"
+#include "drivers/gles3/shaders/ssao.glsl.gen.h"
+#include "drivers/gles3/shaders/ssao_blur.glsl.gen.h"
+#include "drivers/gles3/shaders/ssao_minify.glsl.gen.h"
+#include "drivers/gles3/shaders/subsurf_scattering.glsl.gen.h"
+#include "drivers/gles3/shaders/tonemap.glsl.gen.h"
+
+*/
+
+class RasterizerSceneGLES2 : public RasterizerScene {
+public:
+ RasterizerStorageGLES2 *storage;
+ struct State {
+
+ bool texscreen_copied;
+ int current_blend_mode;
+ float current_line_width;
+ int current_depth_draw;
+ bool current_depth_test;
+ GLuint current_main_tex;
+
+ SceneShaderGLES2 scene_shader;
+ // CubeToDpShaderGLES3 cube_to_dp_shader;
+ // ResolveShaderGLES3 resolve_shader;
+ // ScreenSpaceReflectionShaderGLES3 ssr_shader;
+ // EffectBlurShaderGLES3 effect_blur_shader;
+ // SubsurfScatteringShaderGLES3 sss_shader;
+ // SsaoMinifyShaderGLES3 ssao_minify_shader;
+ // SsaoShaderGLES3 ssao_shader;
+ // SsaoBlurShaderGLES3 ssao_blur_shader;
+ // ExposureShaderGLES3 exposure_shader;
+ // TonemapShaderGLES3 tonemap_shader;
+
+ /*
+ struct SceneDataUBO {
+ //this is a std140 compatible struct. Please read the OpenGL 3.3 Specificaiton spec before doing any changes
+ float projection_matrix[16];
+ float inv_projection_matrix[16];
+ float camera_inverse_matrix[16];
+ float camera_matrix[16];
+ float ambient_light_color[4];
+ float bg_color[4];
+ float fog_color_enabled[4];
+ float fog_sun_color_amount[4];
+
+ float ambient_energy;
+ float bg_energy;
+ float z_offset;
+ float z_slope_scale;
+ float shadow_dual_paraboloid_render_zfar;
+ float shadow_dual_paraboloid_render_side;
+ float viewport_size[2];
+ float screen_pixel_size[2];
+ float shadow_atlas_pixel_size[2];
+ float shadow_directional_pixel_size[2];
+
+ float time;
+ float z_far;
+ float reflection_multiplier;
+ float subsurface_scatter_width;
+ float ambient_occlusion_affect_light;
+
+ uint32_t fog_depth_enabled;
+ float fog_depth_begin;
+ float fog_depth_curve;
+ uint32_t fog_transmit_enabled;
+ float fog_transmit_curve;
+ uint32_t fog_height_enabled;
+ float fog_height_min;
+ float fog_height_max;
+ float fog_height_curve;
+ // make sure this struct is padded to be a multiple of 16 bytes for webgl
+
+ } ubo_data;
+
+ GLuint scene_ubo;
+
+ struct EnvironmentRadianceUBO {
+
+ float transform[16];
+ float ambient_contribution;
+ uint8_t padding[12];
+
+ } env_radiance_data;
+
+ GLuint env_radiance_ubo;
+
+ GLuint sky_verts;
+ GLuint sky_array;
+
+ GLuint directional_ubo;
+
+ GLuint spot_array_ubo;
+ GLuint omni_array_ubo;
+ GLuint reflection_array_ubo;
+
+ GLuint immediate_buffer;
+ GLuint immediate_array;
+
+ uint32_t ubo_light_size;
+ uint8_t *spot_array_tmp;
+ uint8_t *omni_array_tmp;
+ uint8_t *reflection_array_tmp;
+
+ int max_ubo_lights;
+ int max_forward_lights_per_object;
+ int max_ubo_reflections;
+ int max_skeleton_bones;
+
+ bool used_contact_shadows;
+
+ int spot_light_count;
+ int omni_light_count;
+ int directional_light_count;
+ int reflection_probe_count;
+
+ bool cull_front;
+ bool cull_disabled;
+ bool used_sss;
+ bool used_screen_texture;
+ bool using_contact_shadows;
+
+ VS::ViewportDebugDraw debug_draw;
+ */
+ } state;
+
+ /* SHADOW ATLAS API */
+
+ RID shadow_atlas_create();
+ void shadow_atlas_set_size(RID p_atlas, int p_size);
+ void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision);
+ bool shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version);
+
+ virtual int get_directional_light_shadow_size(RID p_light_intance);
+ virtual void set_directional_shadow_count(int p_count);
+
+ /* REFLECTION PROBE ATLAS API */
+
+ virtual RID reflection_atlas_create();
+ virtual void reflection_atlas_set_size(RID p_ref_atlas, int p_size);
+ virtual void reflection_atlas_set_subdivision(RID p_ref_atlas, int p_subdiv);
+
+ /* REFLECTION CUBEMAPS */
+
+ /* REFLECTION PROBE INSTANCE */
+
+ virtual RID reflection_probe_instance_create(RID p_probe);
+ virtual void reflection_probe_instance_set_transform(RID p_instance, const Transform &p_transform);
+ virtual void reflection_probe_release_atlas_index(RID p_instance);
+ virtual bool reflection_probe_instance_needs_redraw(RID p_instance);
+ virtual bool reflection_probe_instance_has_reflection(RID p_instance);
+ virtual bool reflection_probe_instance_begin_render(RID p_instance, RID p_reflection_atlas);
+ virtual bool reflection_probe_instance_postprocess_step(RID p_instance);
+
+ /* ENVIRONMENT API */
+ virtual RID environment_create();
+
+ virtual void environment_set_background(RID p_env, VS::EnvironmentBG p_bg);
+ virtual void environment_set_sky(RID p_env, RID p_sky);
+ virtual void environment_set_sky_custom_fov(RID p_env, float p_scale);
+ virtual void environment_set_bg_color(RID p_env, const Color &p_color);
+ virtual void environment_set_bg_energy(RID p_env, float p_energy);
+ virtual void environment_set_canvas_max_layer(RID p_env, int p_max_layer);
+ virtual void environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy = 1.0, float p_sky_contribution = 0.0);
+
+ virtual void environment_set_dof_blur_near(RID p_env, bool p_enable, float p_distance, float p_transition, float p_amount, VS::EnvironmentDOFBlurQuality p_quality);
+ virtual void environment_set_dof_blur_far(RID p_env, bool p_enable, float p_distance, float p_transition, float p_amount, VS::EnvironmentDOFBlurQuality p_quality);
+ virtual void environment_set_glow(RID p_env, bool p_enable, int p_level_flags, float p_intensity, float p_strength, float p_bloom_threshold, VS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, bool p_bicubic_upscale);
+ virtual void environment_set_fog(RID p_env, bool p_enable, float p_begin, float p_end, RID p_gradient_texture);
+
+ virtual void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_in, float p_fade_out, float p_depth_tolerance, bool p_roughness);
+ virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_radius2, float p_intensity2, float p_bias, float p_light_affect, const Color &p_color, VS::EnvironmentSSAOQuality p_quality, VS::EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness);
+
+ virtual void environment_set_tonemap(RID p_env, VS::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);
+
+ virtual void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, RID p_ramp);
+
+ virtual void environment_set_fog(RID p_env, bool p_enable, const Color &p_color, const Color &p_sun_color, float p_sun_amount);
+ virtual void environment_set_fog_depth(RID p_env, bool p_enable, float p_depth_begin, float p_depth_curve, bool p_transmit, float p_transmit_curve);
+ virtual void environment_set_fog_height(RID p_env, bool p_enable, float p_min_height, float p_max_height, float p_height_curve);
+
+ virtual bool is_environment(RID p_env);
+
+ virtual VS::EnvironmentBG environment_get_background(RID p_env);
+ virtual int environment_get_canvas_max_layer(RID p_env);
+
+ /* LIGHT INSTANCE */
+ virtual RID light_instance_create(RID p_light);
+ virtual void light_instance_set_transform(RID p_light_instance, const Transform &p_transform);
+ virtual void light_instance_set_shadow_transform(RID p_light_instance, const CameraMatrix &p_projection, const Transform &p_transform, float p_far, float p_split, int p_pass, float p_bias_scale = 1.0);
+ virtual void light_instance_mark_visible(RID p_light_instance);
+
+ /* REFLECTION INSTANCE */
+
+ virtual RID gi_probe_instance_create();
+ virtual void gi_probe_instance_set_light_data(RID p_probe, RID p_base, RID p_data);
+ virtual void gi_probe_instance_set_transform_to_data(RID p_probe, const Transform &p_xform);
+ virtual void gi_probe_instance_set_bounds(RID p_probe, const Vector3 &p_bounds);
+
+ /* RENDER LIST */
+
+ virtual void render_scene(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, InstanceBase **p_cull_result, int p_cull_count, RID *p_light_cull_result, int p_light_cull_count, RID *p_reflection_probe_cull_result, int p_reflection_probe_cull_count, RID p_environment, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass);
+ virtual void render_shadow(RID p_light, RID p_shadow_atlas, int p_pass, InstanceBase **p_cull_result, int p_cull_count);
+ virtual bool free(RID p_rid);
+
+ virtual void set_scene_pass(uint64_t p_pass);
+ virtual void set_debug_draw_mode(VS::ViewportDebugDraw p_debug_draw);
+
+ void iteration();
+ void initialize();
+ void finalize();
+ RasterizerSceneGLES2();
+};
+
+#endif // RASTERIZERSCENEGLES2_H
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp
new file mode 100644
index 0000000000..0f5c139f45
--- /dev/null
+++ b/drivers/gles2/rasterizer_storage_gles2.cpp
@@ -0,0 +1,2061 @@
+/*************************************************************************/
+/* rasterizer_storage_gles2.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 "rasterizer_storage_gles2.h"
+#include "project_settings.h"
+#include "rasterizer_canvas_gles2.h"
+#include "rasterizer_scene_gles2.h"
+
+GLuint RasterizerStorageGLES2::system_fbo = 0;
+
+/* TEXTURE API */
+
+Ref<Image> RasterizerStorageGLES2::_get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type) {
+
+ r_gl_format = 0;
+ Ref<Image> image = p_image;
+
+ bool need_decompress = false;
+
+ switch (p_format) {
+
+ case Image::FORMAT_L8: {
+
+ r_gl_internal_format = GL_LUMINANCE;
+ r_gl_format = GL_LUMINANCE;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ } break;
+ case Image::FORMAT_LA8: {
+ r_gl_internal_format = GL_LUMINANCE_ALPHA;
+ r_gl_format = GL_LUMINANCE_ALPHA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ } break;
+ case Image::FORMAT_R8: {
+
+ r_gl_internal_format = GL_ALPHA;
+ r_gl_format = GL_ALPHA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+
+ } break;
+ case Image::FORMAT_RG8: {
+
+ ERR_EXPLAIN("RG texture not supported");
+ ERR_FAIL_V(image);
+
+ } break;
+ case Image::FORMAT_RGB8: {
+
+ r_gl_internal_format = GL_RGB;
+ r_gl_format = GL_RGB;
+ r_gl_type = GL_UNSIGNED_BYTE;
+
+ } break;
+ case Image::FORMAT_RGBA8: {
+
+ r_gl_format = GL_RGBA;
+ r_gl_internal_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+
+ } break;
+ case Image::FORMAT_RGBA4444: {
+
+ r_gl_internal_format = GL_RGBA;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_SHORT_4_4_4_4;
+
+ } break;
+ case Image::FORMAT_RGBA5551: {
+
+ r_gl_internal_format = GL_RGB5_A1;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_SHORT_5_5_5_1;
+
+ } break;
+ case Image::FORMAT_RF: {
+ ERR_EXPLAIN("R float texture not supported");
+ ERR_FAIL_V(image);
+
+ } break;
+ case Image::FORMAT_RGF: {
+ ERR_EXPLAIN("RG float texture not supported");
+ ERR_FAIL_V(image);
+
+ } break;
+ case Image::FORMAT_RGBF: {
+
+ ERR_EXPLAIN("RGB float texture not supported");
+ ERR_FAIL_V(image);
+
+ } break;
+ case Image::FORMAT_RGBAF: {
+
+ ERR_EXPLAIN("RGBA float texture not supported");
+ ERR_FAIL_V(image);
+
+ } break;
+ case Image::FORMAT_RH: {
+ ERR_EXPLAIN("R half float texture not supported");
+ ERR_FAIL_V(image);
+ } break;
+ case Image::FORMAT_RGH: {
+ ERR_EXPLAIN("RG half float texture not supported");
+ ERR_FAIL_V(image);
+
+ } break;
+ case Image::FORMAT_RGBH: {
+ ERR_EXPLAIN("RGB half float texture not supported");
+ ERR_FAIL_V(image);
+
+ } break;
+ case Image::FORMAT_RGBAH: {
+ ERR_EXPLAIN("RGBA half float texture not supported");
+ ERR_FAIL_V(image);
+
+ } break;
+ case Image::FORMAT_RGBE9995: {
+ ERR_EXPLAIN("RGBA float texture not supported");
+ ERR_FAIL_V(image);
+
+ } break;
+ case Image::FORMAT_DXT1: {
+
+ need_decompress = true;
+
+ } break;
+ case Image::FORMAT_DXT3: {
+
+ need_decompress = true;
+
+ } break;
+ case Image::FORMAT_DXT5: {
+
+ need_decompress = true;
+
+ } break;
+ case Image::FORMAT_RGTC_R: {
+
+ need_decompress = true;
+
+ } break;
+ case Image::FORMAT_RGTC_RG: {
+
+ need_decompress = true;
+
+ } break;
+ case Image::FORMAT_BPTC_RGBA: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_BPTC_RGBF: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_BPTC_RGBFU: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_PVRTC2: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_PVRTC2A: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_PVRTC4: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_PVRTC4A: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_ETC: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_ETC2_R11: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_ETC2_R11S: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_ETC2_RG11: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_ETC2_RG11S: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_ETC2_RGB8: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_ETC2_RGBA8: {
+
+ need_decompress = true;
+ } break;
+ case Image::FORMAT_ETC2_RGB8A1: {
+
+ need_decompress = true;
+ } break;
+ default: {
+
+ ERR_FAIL_V(Ref<Image>());
+ }
+ }
+
+ if (need_decompress) {
+
+ if (!image.is_null()) {
+ image = image->duplicate();
+ image->decompress();
+ ERR_FAIL_COND_V(image->is_compressed(), image);
+ image->convert(Image::FORMAT_RGBA8);
+ }
+
+ r_gl_format = GL_RGBA;
+ r_gl_internal_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+
+ return image;
+ }
+
+ return p_image;
+}
+
+static const GLenum _cube_side_enum[6] = {
+
+ GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
+ GL_TEXTURE_CUBE_MAP_POSITIVE_X,
+ GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
+ GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,
+ GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
+
+};
+
+RID RasterizerStorageGLES2::texture_create() {
+
+ Texture *texture = memnew(Texture);
+ ERR_FAIL_COND_V(!texture, RID());
+ glGenTextures(1, &texture->tex_id);
+ texture->active = false;
+ texture->total_data_size = 0;
+
+ return texture_owner.make_rid(texture);
+}
+
+void RasterizerStorageGLES2::texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags) {
+ GLenum format;
+ GLenum internal_format;
+ GLenum type;
+
+ if (p_flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING) {
+ p_flags &= ~VS::TEXTURE_FLAG_MIPMAPS; // no mipies for video
+ }
+
+ Texture *texture = texture_owner.getornull(p_texture);
+ ERR_FAIL_COND(!texture);
+ texture->width = p_width;
+ texture->height = p_height;
+ texture->format = p_format;
+ texture->flags = p_flags;
+ texture->stored_cube_sides = 0;
+ texture->target = (p_flags & VS::TEXTURE_FLAG_CUBEMAP) ? GL_TEXTURE_CUBE_MAP : GL_TEXTURE_2D;
+
+ _get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, format, internal_format, type);
+
+ texture->alloc_width = texture->width;
+ texture->alloc_height = texture->height;
+
+ texture->gl_format_cache = format;
+ texture->gl_type_cache = type;
+ texture->gl_internal_format_cache = internal_format;
+ texture->data_size = 0;
+ texture->mipmaps = 1;
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(texture->target, texture->tex_id);
+
+ if (p_flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING) {
+ //prealloc if video
+ glTexImage2D(texture->target, 0, internal_format, p_width, p_height, 0, format, type, NULL);
+ }
+
+ texture->active = true;
+}
+
+void RasterizerStorageGLES2::texture_set_data(RID p_texture, const Ref<Image> &p_image, VS::CubeMapSide p_cube_side) {
+ Texture *texture = texture_owner.getornull(p_texture);
+
+ ERR_FAIL_COND(!texture);
+ ERR_FAIL_COND(!texture->active);
+ ERR_FAIL_COND(texture->render_target);
+ ERR_FAIL_COND(texture->format != p_image->get_format());
+ ERR_FAIL_COND(p_image.is_null());
+
+ GLenum type;
+ GLenum format;
+ GLenum internal_format;
+ bool compressed = false;
+ bool srgb;
+
+ if (config.keep_original_textures && !(texture->flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING)) {
+ texture->images[p_cube_side] = p_image;
+ }
+
+ Ref<Image> img = _get_gl_image_and_format(p_image, p_image->get_format(), texture->flags, format, internal_format, type);
+
+ if (config.shrink_textures_x2 && (p_image->has_mipmaps() || !p_image->is_compressed()) && !(texture->flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING)) {
+
+ texture->alloc_height = MAX(1, texture->alloc_height / 2);
+ texture->alloc_width = MAX(1, texture->alloc_width / 2);
+
+ if (texture->alloc_width == img->get_width() / 2 && texture->alloc_height == img->get_height() / 2) {
+
+ img->shrink_x2();
+ } else if (img->get_format() <= Image::FORMAT_RGBA8) {
+
+ img->resize(texture->alloc_width, texture->alloc_height, Image::INTERPOLATE_BILINEAR);
+ }
+ };
+
+ GLenum blit_target = (texture->target == GL_TEXTURE_CUBE_MAP) ? _cube_side_enum[p_cube_side] : GL_TEXTURE_2D;
+
+ texture->data_size = img->get_data().size();
+ PoolVector<uint8_t>::Read read = img->get_data().read();
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(texture->target, texture->tex_id);
+
+ texture->ignore_mipmaps = compressed && !img->has_mipmaps();
+
+ if ((texture->flags & VS::TEXTURE_FLAG_MIPMAPS) && !texture->ignore_mipmaps)
+ glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, config.use_fast_texture_filter ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR_MIPMAP_LINEAR);
+ else {
+ if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
+ glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ } else {
+ glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ }
+ }
+
+ if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
+
+ glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Linear Filtering
+
+ } else {
+
+ glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); // raw Filtering
+ }
+
+ if (((texture->flags & VS::TEXTURE_FLAG_REPEAT) || (texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT)) && texture->target != GL_TEXTURE_CUBE_MAP) {
+
+ if (texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT) {
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
+ } else {
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ }
+ } else {
+
+ //glTexParameterf( texture->target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE );
+ glTexParameterf(texture->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterf(texture->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ }
+
+//set swizle for older format compatibility
+#ifdef GLES_OVER_GL
+ switch (texture->format) {
+
+ case Image::FORMAT_L8: {
+
+ } break;
+ case Image::FORMAT_LA8: {
+
+ } break;
+ default: {
+
+ } break;
+ }
+#endif
+
+ int mipmaps = ((texture->flags & VS::TEXTURE_FLAG_MIPMAPS) && img->has_mipmaps()) ? img->get_mipmap_count() + 1 : 1;
+
+ int w = img->get_width();
+ int h = img->get_height();
+
+ int tsize = 0;
+
+ for (int i = 0; i < mipmaps; i++) {
+
+ int size, ofs;
+ img->get_mipmap_offset_and_size(i, ofs, size);
+
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ if (texture->flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING) {
+ glTexSubImage2D(blit_target, i, 0, 0, w, h, format, type, &read[ofs]);
+ } else {
+ glTexImage2D(blit_target, i, internal_format, w, h, 0, format, type, &read[ofs]);
+ }
+
+ tsize += size;
+
+ w = MAX(1, w >> 1);
+ h = MAX(1, h >> 1);
+ }
+
+ info.texture_mem -= texture->total_data_size;
+ texture->total_data_size = tsize;
+ info.texture_mem += texture->total_data_size;
+
+ // printf("texture: %i x %i - size: %i - total: %i\n", texture->width, texture->height, tsize, info.texture_mem);
+
+ texture->stored_cube_sides |= (1 << p_cube_side);
+
+ if ((texture->flags & VS::TEXTURE_FLAG_MIPMAPS) && mipmaps == 1 && !texture->ignore_mipmaps && (!(texture->flags & VS::TEXTURE_FLAG_CUBEMAP) || texture->stored_cube_sides == (1 << 6) - 1)) {
+ //generate mipmaps if they were requested and the image does not contain them
+ glGenerateMipmap(texture->target);
+ }
+
+ texture->mipmaps = mipmaps;
+}
+
+Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side) const {
+
+ Texture *texture = texture_owner.getornull(p_texture);
+
+ ERR_FAIL_COND_V(!texture, Ref<Image>());
+ ERR_FAIL_COND_V(!texture->active, Ref<Image>());
+ ERR_FAIL_COND_V(texture->data_size == 0 && !texture->render_target, Ref<Image>());
+
+ if (!texture->images[p_cube_side].is_null()) {
+ return texture->images[p_cube_side];
+ }
+#ifdef GLES_OVER_GL
+
+ PoolVector<uint8_t> data;
+
+ int data_size = Image::get_image_data_size(texture->alloc_width, texture->alloc_height, texture->format, texture->mipmaps > 1 ? -1 : 0);
+
+ data.resize(data_size * 2); //add some memory at the end, just in case for buggy drivers
+ PoolVector<uint8_t>::Write wb = data.write();
+
+ glActiveTexture(GL_TEXTURE0);
+
+ glBindTexture(texture->target, texture->tex_id);
+
+ glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
+
+ //print_line("GET FORMAT: " + Image::get_format_name(texture->format) + " mipmaps: " + itos(texture->mipmaps));
+
+ for (int i = 0; i < texture->mipmaps; i++) {
+
+ int ofs = 0;
+ if (i > 0) {
+ ofs = Image::get_image_data_size(texture->alloc_width, texture->alloc_height, texture->format, i - 1);
+ }
+
+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
+
+ glGetTexImage(texture->target, i, texture->gl_format_cache, texture->gl_type_cache, &wb[ofs]);
+ }
+
+ wb = PoolVector<uint8_t>::Write();
+
+ data.resize(data_size);
+
+ Image *img = memnew(Image(texture->alloc_width, texture->alloc_height, texture->mipmaps > 1 ? true : false, texture->format, data));
+
+ return Ref<Image>(img);
+#else
+
+ ERR_EXPLAIN("Sorry, It's not posible to obtain images back in OpenGL ES");
+ return Ref<Image>();
+#endif
+}
+
+void RasterizerStorageGLES2::texture_set_flags(RID p_texture, uint32_t p_flags) {
+
+ Texture *texture = texture_owner.getornull(p_texture);
+ ERR_FAIL_COND(!texture);
+
+ bool had_mipmaps = texture->flags & VS::TEXTURE_FLAG_MIPMAPS;
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(texture->target, texture->tex_id);
+ uint32_t cube = texture->flags & VS::TEXTURE_FLAG_CUBEMAP;
+ texture->flags = p_flags | cube; // can't remove a cube from being a cube
+
+ if (((texture->flags & VS::TEXTURE_FLAG_REPEAT) || (texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT)) && texture->target != GL_TEXTURE_CUBE_MAP) {
+
+ if (texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT) {
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
+ } else {
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ }
+ } else {
+ //glTexParameterf( texture->target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE );
+ glTexParameterf(texture->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterf(texture->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ }
+
+ if ((texture->flags & VS::TEXTURE_FLAG_MIPMAPS) && !texture->ignore_mipmaps) {
+ if (!had_mipmaps && texture->mipmaps == 1) {
+ glGenerateMipmap(texture->target);
+ }
+ glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, config.use_fast_texture_filter ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR_MIPMAP_LINEAR);
+
+ } else {
+ if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
+ glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ } else {
+ glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ }
+ }
+
+ if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
+
+ glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Linear Filtering
+
+ } else {
+
+ glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); // raw Filtering
+ }
+}
+
+uint32_t RasterizerStorageGLES2::texture_get_flags(RID p_texture) const {
+ Texture *texture = texture_owner.getornull(p_texture);
+
+ ERR_FAIL_COND_V(!texture, 0);
+
+ return texture->flags;
+}
+
+Image::Format RasterizerStorageGLES2::texture_get_format(RID p_texture) const {
+ Texture *texture = texture_owner.getornull(p_texture);
+
+ ERR_FAIL_COND_V(!texture, Image::FORMAT_L8);
+
+ return texture->format;
+}
+
+uint32_t RasterizerStorageGLES2::texture_get_texid(RID p_texture) const {
+ Texture *texture = texture_owner.getornull(p_texture);
+
+ ERR_FAIL_COND_V(!texture, 0);
+
+ return texture->tex_id;
+}
+
+uint32_t RasterizerStorageGLES2::texture_get_width(RID p_texture) const {
+ Texture *texture = texture_owner.getornull(p_texture);
+
+ ERR_FAIL_COND_V(!texture, 0);
+
+ return texture->width;
+}
+
+uint32_t RasterizerStorageGLES2::texture_get_height(RID p_texture) const {
+ Texture *texture = texture_owner.getornull(p_texture);
+
+ ERR_FAIL_COND_V(!texture, 0);
+
+ return texture->height;
+}
+
+void RasterizerStorageGLES2::texture_set_size_override(RID p_texture, int p_width, int p_height) {
+ Texture *texture = texture_owner.getornull(p_texture);
+
+ ERR_FAIL_COND(!texture);
+ ERR_FAIL_COND(texture->render_target);
+
+ ERR_FAIL_COND(p_width <= 0 || p_width > 16384);
+ ERR_FAIL_COND(p_height <= 0 || p_height > 16384);
+ //real texture size is in alloc width and height
+ texture->width = p_width;
+ texture->height = p_height;
+}
+
+void RasterizerStorageGLES2::texture_set_path(RID p_texture, const String &p_path) {
+ Texture *texture = texture_owner.getornull(p_texture);
+ ERR_FAIL_COND(!texture);
+
+ texture->path = p_path;
+}
+
+String RasterizerStorageGLES2::texture_get_path(RID p_texture) const {
+ Texture *texture = texture_owner.getornull(p_texture);
+ ERR_FAIL_COND_V(!texture, "");
+
+ return texture->path;
+}
+
+void RasterizerStorageGLES2::texture_debug_usage(List<VS::TextureInfo> *r_info) {
+ List<RID> textures;
+ texture_owner.get_owned_list(&textures);
+
+ for (List<RID>::Element *E = textures.front(); E; E = E->next()) {
+
+ Texture *t = texture_owner.getornull(E->get());
+ if (!t)
+ continue;
+ VS::TextureInfo tinfo;
+ tinfo.path = t->path;
+ tinfo.format = t->format;
+ tinfo.size.x = t->alloc_width;
+ tinfo.size.y = t->alloc_height;
+ tinfo.bytes = t->total_data_size;
+ r_info->push_back(tinfo);
+ }
+}
+
+void RasterizerStorageGLES2::texture_set_shrink_all_x2_on_set_data(bool p_enable) {
+ config.shrink_textures_x2 = p_enable;
+}
+
+void RasterizerStorageGLES2::textures_keep_original(bool p_enable) {
+ config.keep_original_textures = p_enable;
+}
+
+void RasterizerStorageGLES2::texture_set_proxy(RID p_texture, RID p_proxy) {
+ Texture *texture = texture_owner.getornull(p_texture);
+ ERR_FAIL_COND(!texture);
+
+ if (texture->proxy) {
+ texture->proxy->proxy_owners.erase(texture);
+ texture->proxy = NULL;
+ }
+
+ if (p_proxy.is_valid()) {
+ Texture *proxy = texture_owner.get(p_proxy);
+ ERR_FAIL_COND(!proxy);
+ ERR_FAIL_COND(proxy == texture);
+ proxy->proxy_owners.insert(texture);
+ texture->proxy = proxy;
+ }
+}
+
+void RasterizerStorageGLES2::texture_set_detect_3d_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata) {
+ // TODO
+}
+
+void RasterizerStorageGLES2::texture_set_detect_srgb_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata) {
+ // TODO
+}
+
+void RasterizerStorageGLES2::texture_set_detect_normal_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata) {
+ // TODO
+}
+
+RID RasterizerStorageGLES2::texture_create_radiance_cubemap(RID p_source, int p_resolution) const {
+ // TODO
+ return RID();
+}
+
+RID RasterizerStorageGLES2::sky_create() {
+ return RID();
+}
+
+void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_radiance_size) {
+}
+
+/* SHADER API */
+
+RID RasterizerStorageGLES2::shader_create() {
+
+ Shader *shader = memnew(Shader);
+ shader->mode = VS::SHADER_SPATIAL;
+ shader->shader = &scene->state.scene_shader;
+ RID rid = shader_owner.make_rid(shader);
+ _shader_make_dirty(shader);
+ shader->self = rid;
+
+ return rid;
+}
+
+void RasterizerStorageGLES2::_shader_make_dirty(Shader *p_shader) {
+ if (p_shader->dirty_list.in_list())
+ return;
+
+ _shader_dirty_list.add(&p_shader->dirty_list);
+}
+
+void RasterizerStorageGLES2::shader_set_code(RID p_shader, const String &p_code) {
+
+ Shader *shader = shader_owner.getornull(p_shader);
+ ERR_FAIL_COND(!shader);
+
+ shader->code = p_code;
+
+ String mode_string = ShaderLanguage::get_shader_type(p_code);
+ VS::ShaderMode mode;
+
+ if (mode_string == "canvas_item")
+ mode = VS::SHADER_CANVAS_ITEM;
+ else if (mode_string == "particles")
+ mode = VS::SHADER_PARTICLES;
+ else
+ mode = VS::SHADER_SPATIAL;
+
+ if (shader->custom_code_id && mode != shader->mode) {
+ shader->shader->free_custom_shader(shader->custom_code_id);
+ shader->custom_code_id = 0;
+ }
+
+ shader->mode = mode;
+
+ // TODO handle all shader types
+ if (mode == VS::SHADER_CANVAS_ITEM) {
+ shader->shader = &canvas->state.canvas_shader;
+
+ } else {
+ return;
+ }
+
+ if (shader->custom_code_id == 0) {
+ shader->custom_code_id = shader->shader->create_custom_shader();
+ }
+
+ _shader_make_dirty(shader);
+}
+
+String RasterizerStorageGLES2::shader_get_code(RID p_shader) const {
+
+ const Shader *shader = shader_owner.get(p_shader);
+ ERR_FAIL_COND_V(!shader, "");
+
+ return shader->code;
+}
+
+void RasterizerStorageGLES2::_update_shader(Shader *p_shader) const {
+
+ _shader_dirty_list.remove(&p_shader->dirty_list);
+
+ p_shader->valid = false;
+
+ p_shader->uniforms.clear();
+
+ ShaderCompilerGLES2::GeneratedCode gen_code;
+ ShaderCompilerGLES2::IdentifierActions *actions = NULL;
+
+ switch (p_shader->mode) {
+
+ // TODO
+
+ case VS::SHADER_CANVAS_ITEM: {
+
+ p_shader->canvas_item.blend_mode = Shader::CanvasItem::BLEND_MODE_MIX;
+
+ p_shader->canvas_item.uses_screen_texture = false;
+ p_shader->canvas_item.uses_screen_uv = false;
+ p_shader->canvas_item.uses_time = false;
+
+ shaders.actions_canvas.render_mode_values["blend_add"] = Pair<int *, int>(&p_shader->canvas_item.blend_mode, Shader::CanvasItem::BLEND_MODE_ADD);
+ shaders.actions_canvas.render_mode_values["blend_mix"] = Pair<int *, int>(&p_shader->canvas_item.blend_mode, Shader::CanvasItem::BLEND_MODE_MIX);
+ shaders.actions_canvas.render_mode_values["blend_sub"] = Pair<int *, int>(&p_shader->canvas_item.blend_mode, Shader::CanvasItem::BLEND_MODE_SUB);
+ shaders.actions_canvas.render_mode_values["blend_mul"] = Pair<int *, int>(&p_shader->canvas_item.blend_mode, Shader::CanvasItem::BLEND_MODE_MUL);
+ shaders.actions_canvas.render_mode_values["blend_premul_alpha"] = Pair<int *, int>(&p_shader->canvas_item.blend_mode, Shader::CanvasItem::BLEND_MODE_PMALPHA);
+
+ // shaders.actions_canvas.render_mode_values["unshaded"] = Pair<int *, int>(&p_shader->canvas_item.light_mode, Shader::CanvasItem::LIGHT_MODE_UNSHADED);
+ // shaders.actions_canvas.render_mode_values["light_only"] = Pair<int *, int>(&p_shader->canvas_item.light_mode, Shader::CanvasItem::LIGHT_MODE_LIGHT_ONLY);
+
+ shaders.actions_canvas.usage_flag_pointers["SCREEN_UV"] = &p_shader->canvas_item.uses_screen_uv;
+ shaders.actions_canvas.usage_flag_pointers["SCREEN_PIXEL_SIZE"] = &p_shader->canvas_item.uses_screen_uv;
+ shaders.actions_canvas.usage_flag_pointers["SCREEN_TEXTURE"] = &p_shader->canvas_item.uses_screen_texture;
+ shaders.actions_canvas.usage_flag_pointers["TIME"] = &p_shader->canvas_item.uses_time;
+
+ actions = &shaders.actions_canvas;
+ actions->uniforms = &p_shader->uniforms;
+ } break;
+
+ default: {
+ return;
+ } break;
+ }
+
+ Error err = shaders.compiler.compile(p_shader->mode, p_shader->code, actions, p_shader->path, gen_code);
+
+ ERR_FAIL_COND(err != OK);
+
+ p_shader->shader->set_custom_shader_code(p_shader->custom_code_id, gen_code.vertex, gen_code.vertex_global, gen_code.fragment, gen_code.light, gen_code.fragment_global, gen_code.uniforms, gen_code.texture_uniforms, gen_code.custom_defines);
+
+ p_shader->texture_count = gen_code.texture_uniforms.size();
+ p_shader->texture_hints = gen_code.texture_hints;
+
+ p_shader->uses_vertex_time = gen_code.uses_vertex_time;
+ p_shader->uses_fragment_time = gen_code.uses_fragment_time;
+
+ for (SelfList<Material> *E = p_shader->materials.first(); E; E = E->next()) {
+ _material_make_dirty(E->self());
+ }
+
+ p_shader->valid = true;
+ p_shader->version++;
+}
+
+void RasterizerStorageGLES2::update_dirty_shaders() {
+ while (_shader_dirty_list.first()) {
+ _update_shader(_shader_dirty_list.first()->self());
+ }
+}
+
+void RasterizerStorageGLES2::shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const {
+
+ Shader *shader = shader_owner.get(p_shader);
+ ERR_FAIL_COND(!shader);
+
+ if (shader->dirty_list.in_list()) {
+ _update_shader(shader);
+ }
+
+ Map<int, StringName> order;
+
+ for (Map<StringName, ShaderLanguage::ShaderNode::Uniform>::Element *E = shader->uniforms.front(); E; E = E->next()) {
+
+ if (E->get().texture_order >= 0) {
+ order[E->get().texture_order + 100000] = E->key();
+ } else {
+ order[E->get().order] = E->key();
+ }
+ }
+
+ for (Map<int, StringName>::Element *E = order.front(); E; E = E->next()) {
+
+ PropertyInfo pi;
+ ShaderLanguage::ShaderNode::Uniform &u = shader->uniforms[E->get()];
+
+ pi.name = E->get();
+
+ switch (u.type) {
+ case ShaderLanguage::TYPE_VOID: {
+ pi.type = Variant::NIL;
+ } break;
+
+ case ShaderLanguage::TYPE_BOOL: {
+ pi.type = Variant::BOOL;
+ } break;
+
+ // bool vectors
+ case ShaderLanguage::TYPE_BVEC2: {
+ pi.type = Variant::INT;
+ pi.hint = PROPERTY_HINT_FLAGS;
+ pi.hint_string = "x,y";
+ } break;
+ case ShaderLanguage::TYPE_BVEC3: {
+ pi.type = Variant::INT;
+ pi.hint = PROPERTY_HINT_FLAGS;
+ pi.hint_string = "x,y,z";
+ } break;
+ case ShaderLanguage::TYPE_BVEC4: {
+ pi.type = Variant::INT;
+ pi.hint = PROPERTY_HINT_FLAGS;
+ pi.hint_string = "x,y,z,w";
+ } break;
+
+ // int stuff
+ case ShaderLanguage::TYPE_UINT:
+ case ShaderLanguage::TYPE_INT: {
+ pi.type = Variant::INT;
+
+ if (u.hint == ShaderLanguage::ShaderNode::Uniform::HINT_RANGE) {
+ pi.hint = PROPERTY_HINT_RANGE;
+ pi.hint_string = rtos(u.hint_range[0]) + "," + rtos(u.hint_range[1]);
+ }
+ } break;
+
+ case ShaderLanguage::TYPE_IVEC2:
+ case ShaderLanguage::TYPE_UVEC2:
+ case ShaderLanguage::TYPE_IVEC3:
+ case ShaderLanguage::TYPE_UVEC3:
+ case ShaderLanguage::TYPE_IVEC4:
+ case ShaderLanguage::TYPE_UVEC4: {
+ pi.type = Variant::POOL_INT_ARRAY;
+ } break;
+
+ case ShaderLanguage::TYPE_VEC2: {
+ pi.type = Variant::VECTOR2;
+ } break;
+ case ShaderLanguage::TYPE_VEC3: {
+ pi.type = Variant::VECTOR3;
+ } break;
+
+ case ShaderLanguage::TYPE_VEC4: {
+ if (u.hint == ShaderLanguage::ShaderNode::Uniform::HINT_COLOR) {
+ pi.type = Variant::COLOR;
+ } else {
+ pi.type = Variant::PLANE;
+ }
+ } break;
+
+ case ShaderLanguage::TYPE_MAT2: {
+ pi.type = Variant::TRANSFORM2D;
+ } break;
+
+ case ShaderLanguage::TYPE_MAT3: {
+ pi.type = Variant::BASIS;
+ } break;
+
+ case ShaderLanguage::TYPE_MAT4: {
+ pi.type = Variant::TRANSFORM;
+ } break;
+
+ case ShaderLanguage::TYPE_SAMPLER2D:
+ case ShaderLanguage::TYPE_ISAMPLER2D:
+ case ShaderLanguage::TYPE_USAMPLER2D: {
+ pi.type = Variant::OBJECT;
+ pi.hint = PROPERTY_HINT_RESOURCE_TYPE;
+ pi.hint_string = "Texture";
+ } break;
+
+ case ShaderLanguage::TYPE_SAMPLERCUBE: {
+ pi.type = Variant::OBJECT;
+ pi.hint = PROPERTY_HINT_RESOURCE_TYPE;
+ pi.hint_string = "CubeMap";
+ } break;
+ }
+
+ p_param_list->push_back(pi);
+ }
+}
+
+void RasterizerStorageGLES2::shader_set_default_texture_param(RID p_shader, const StringName &p_name, RID p_texture) {
+
+ Shader *shader = shader_owner.get(p_shader);
+ ERR_FAIL_COND(!shader);
+ ERR_FAIL_COND(p_texture.is_valid() && !texture_owner.owns(p_texture));
+
+ if (p_texture.is_valid()) {
+ shader->default_textures[p_name] = p_texture;
+ } else {
+ shader->default_textures.erase(p_name);
+ }
+
+ _shader_make_dirty(shader);
+}
+
+RID RasterizerStorageGLES2::shader_get_default_texture_param(RID p_shader, const StringName &p_name) const {
+
+ const Shader *shader = shader_owner.get(p_shader);
+ ERR_FAIL_COND_V(!shader, RID());
+
+ const Map<StringName, RID>::Element *E = shader->default_textures.find(p_name);
+
+ if (!E) {
+ return RID();
+ }
+
+ return E->get();
+}
+
+/* COMMON MATERIAL API */
+
+void RasterizerStorageGLES2::_material_make_dirty(Material *p_material) const {
+
+ if (p_material->dirty_list.in_list())
+ return;
+
+ _material_dirty_list.add(&p_material->dirty_list);
+}
+
+RID RasterizerStorageGLES2::material_create() {
+
+ Material *material = memnew(Material);
+
+ return material_owner.make_rid(material);
+}
+
+void RasterizerStorageGLES2::material_set_shader(RID p_material, RID p_shader) {
+
+ Material *material = material_owner.get(p_material);
+ ERR_FAIL_COND(!material);
+
+ Shader *shader = shader_owner.getornull(p_shader);
+
+ if (material->shader) {
+ // if a shader is present, remove the old shader
+ material->shader->materials.remove(&material->list);
+ }
+
+ material->shader = shader;
+
+ if (shader) {
+ shader->materials.add(&material->list);
+ }
+
+ _material_make_dirty(material);
+}
+
+RID RasterizerStorageGLES2::material_get_shader(RID p_material) const {
+
+ const Material *material = material_owner.get(p_material);
+ ERR_FAIL_COND_V(!material, RID());
+
+ if (material->shader) {
+ return material->shader->self;
+ }
+
+ return RID();
+}
+
+void RasterizerStorageGLES2::material_set_param(RID p_material, const StringName &p_param, const Variant &p_value) {
+
+ Material *material = material_owner.get(p_material);
+ ERR_FAIL_COND(!material);
+
+ if (p_value.get_type() == Variant::NIL) {
+ material->params.erase(p_param);
+ } else {
+ material->params[p_param] = p_value;
+ }
+
+ _material_make_dirty(material);
+}
+
+Variant RasterizerStorageGLES2::material_get_param(RID p_material, const StringName &p_param) const {
+
+ const Material *material = material_owner.get(p_material);
+ ERR_FAIL_COND_V(!material, RID());
+
+ if (material->params.has(p_param)) {
+ return material->params[p_param];
+ }
+
+ return Variant();
+}
+
+void RasterizerStorageGLES2::material_set_line_width(RID p_material, float p_width) {
+}
+
+void RasterizerStorageGLES2::material_set_next_pass(RID p_material, RID p_next_material) {
+}
+
+bool RasterizerStorageGLES2::material_is_animated(RID p_material) {
+ return false;
+}
+
+bool RasterizerStorageGLES2::material_casts_shadows(RID p_material) {
+ return false;
+}
+
+void RasterizerStorageGLES2::material_add_instance_owner(RID p_material, RasterizerScene::InstanceBase *p_instance) {
+}
+
+void RasterizerStorageGLES2::material_remove_instance_owner(RID p_material, RasterizerScene::InstanceBase *p_instance) {
+}
+
+void RasterizerStorageGLES2::material_set_render_priority(RID p_material, int priority) {
+}
+
+void RasterizerStorageGLES2::update_dirty_materials() {
+}
+
+/* MESH API */
+
+RID RasterizerStorageGLES2::mesh_create() {
+ return RID();
+}
+
+void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabbs) {
+}
+
+void RasterizerStorageGLES2::mesh_set_blend_shape_count(RID p_mesh, int p_amount) {
+}
+
+int RasterizerStorageGLES2::mesh_get_blend_shape_count(RID p_mesh) const {
+ return 0;
+}
+
+void RasterizerStorageGLES2::mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode) {
+}
+
+VS::BlendShapeMode RasterizerStorageGLES2::mesh_get_blend_shape_mode(RID p_mesh) const {
+ return VS::BLEND_SHAPE_MODE_NORMALIZED;
+}
+
+void RasterizerStorageGLES2::mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) {
+}
+
+void RasterizerStorageGLES2::mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) {
+}
+
+RID RasterizerStorageGLES2::mesh_surface_get_material(RID p_mesh, int p_surface) const {
+ return RID();
+}
+
+int RasterizerStorageGLES2::mesh_surface_get_array_len(RID p_mesh, int p_surface) const {
+ return 0;
+}
+
+int RasterizerStorageGLES2::mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const {
+ return 0;
+}
+
+PoolVector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_array(RID p_mesh, int p_surface) const {
+ return PoolVector<uint8_t>();
+}
+
+PoolVector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_index_array(RID p_mesh, int p_surface) const {
+ return PoolVector<uint8_t>();
+}
+
+uint32_t RasterizerStorageGLES2::mesh_surface_get_format(RID p_mesh, int p_surface) const {
+ return 0;
+}
+
+VS::PrimitiveType RasterizerStorageGLES2::mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const {
+ return VS::PRIMITIVE_TRIANGLES;
+}
+
+AABB RasterizerStorageGLES2::mesh_surface_get_aabb(RID p_mesh, int p_surface) const {
+ return AABB();
+}
+
+Vector<PoolVector<uint8_t> > RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const {
+ return Vector<PoolVector<uint8_t> >();
+}
+Vector<AABB> RasterizerStorageGLES2::mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const {
+ return Vector<AABB>();
+}
+
+void RasterizerStorageGLES2::mesh_remove_surface(RID p_mesh, int p_surface) {
+}
+
+int RasterizerStorageGLES2::mesh_get_surface_count(RID p_mesh) const {
+ return 0;
+}
+
+void RasterizerStorageGLES2::mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) {
+}
+
+AABB RasterizerStorageGLES2::mesh_get_custom_aabb(RID p_mesh) const {
+ return AABB();
+}
+
+AABB RasterizerStorageGLES2::mesh_get_aabb(RID p_mesh, RID p_skeleton) const {
+ return AABB();
+}
+void RasterizerStorageGLES2::mesh_clear(RID p_mesh) {
+}
+
+/* MULTIMESH API */
+
+RID RasterizerStorageGLES2::multimesh_create() {
+ return RID();
+}
+
+void RasterizerStorageGLES2::multimesh_allocate(RID p_multimesh, int p_instances, VS::MultimeshTransformFormat p_transform_format, VS::MultimeshColorFormat p_color_format) {
+}
+
+int RasterizerStorageGLES2::multimesh_get_instance_count(RID p_multimesh) const {
+ return 0;
+}
+
+void RasterizerStorageGLES2::multimesh_set_mesh(RID p_multimesh, RID p_mesh) {
+}
+
+void RasterizerStorageGLES2::multimesh_instance_set_transform(RID p_multimesh, int p_index, const Transform &p_transform) {
+}
+
+void RasterizerStorageGLES2::multimesh_instance_set_transform_2d(RID p_multimesh, int p_index, const Transform2D &p_transform) {
+}
+
+void RasterizerStorageGLES2::multimesh_instance_set_color(RID p_multimesh, int p_index, const Color &p_color) {
+}
+
+RID RasterizerStorageGLES2::multimesh_get_mesh(RID p_multimesh) const {
+ return RID();
+}
+
+Transform RasterizerStorageGLES2::multimesh_instance_get_transform(RID p_multimesh, int p_index) const {
+ return Transform();
+}
+
+Transform2D RasterizerStorageGLES2::multimesh_instance_get_transform_2d(RID p_multimesh, int p_index) const {
+ return Transform2D();
+}
+
+Color RasterizerStorageGLES2::multimesh_instance_get_color(RID p_multimesh, int p_index) const {
+ return Color();
+}
+
+void RasterizerStorageGLES2::multimesh_set_visible_instances(RID p_multimesh, int p_visible) {
+}
+
+int RasterizerStorageGLES2::multimesh_get_visible_instances(RID p_multimesh) const {
+ return 0;
+}
+
+AABB RasterizerStorageGLES2::multimesh_get_aabb(RID p_multimesh) const {
+
+ return AABB();
+}
+
+void RasterizerStorageGLES2::update_dirty_multimeshes() {
+}
+
+/* IMMEDIATE API */
+
+RID RasterizerStorageGLES2::immediate_create() {
+ return RID();
+}
+
+void RasterizerStorageGLES2::immediate_begin(RID p_immediate, VS::PrimitiveType p_rimitive, RID p_texture) {
+}
+
+void RasterizerStorageGLES2::immediate_vertex(RID p_immediate, const Vector3 &p_vertex) {
+}
+
+void RasterizerStorageGLES2::immediate_normal(RID p_immediate, const Vector3 &p_normal) {
+}
+
+void RasterizerStorageGLES2::immediate_tangent(RID p_immediate, const Plane &p_tangent) {
+}
+
+void RasterizerStorageGLES2::immediate_color(RID p_immediate, const Color &p_color) {
+}
+
+void RasterizerStorageGLES2::immediate_uv(RID p_immediate, const Vector2 &tex_uv) {
+}
+
+void RasterizerStorageGLES2::immediate_uv2(RID p_immediate, const Vector2 &tex_uv) {
+}
+
+void RasterizerStorageGLES2::immediate_end(RID p_immediate) {
+}
+
+void RasterizerStorageGLES2::immediate_clear(RID p_immediate) {
+}
+
+AABB RasterizerStorageGLES2::immediate_get_aabb(RID p_immediate) const {
+ return AABB();
+}
+
+void RasterizerStorageGLES2::immediate_set_material(RID p_immediate, RID p_material) {
+}
+
+RID RasterizerStorageGLES2::immediate_get_material(RID p_immediate) const {
+ return RID();
+}
+
+/* SKELETON API */
+
+RID RasterizerStorageGLES2::skeleton_create() {
+ return RID();
+}
+
+void RasterizerStorageGLES2::skeleton_allocate(RID p_skeleton, int p_bones, bool p_2d_skeleton) {
+}
+
+int RasterizerStorageGLES2::skeleton_get_bone_count(RID p_skeleton) const {
+ return 0;
+}
+
+void RasterizerStorageGLES2::skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform) {
+}
+
+Transform RasterizerStorageGLES2::skeleton_bone_get_transform(RID p_skeleton, int p_bone) const {
+ return Transform();
+}
+void RasterizerStorageGLES2::skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform) {
+}
+
+Transform2D RasterizerStorageGLES2::skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const {
+ return Transform2D();
+}
+
+void RasterizerStorageGLES2::update_dirty_skeletons() {
+}
+
+/* Light API */
+
+RID RasterizerStorageGLES2::light_create(VS::LightType p_type) {
+ return RID();
+}
+
+void RasterizerStorageGLES2::light_set_color(RID p_light, const Color &p_color) {
+}
+
+void RasterizerStorageGLES2::light_set_param(RID p_light, VS::LightParam p_param, float p_value) {
+}
+
+void RasterizerStorageGLES2::light_set_shadow(RID p_light, bool p_enabled) {
+}
+
+void RasterizerStorageGLES2::light_set_shadow_color(RID p_light, const Color &p_color) {
+}
+
+void RasterizerStorageGLES2::light_set_projector(RID p_light, RID p_texture) {
+}
+
+void RasterizerStorageGLES2::light_set_negative(RID p_light, bool p_enable) {
+}
+
+void RasterizerStorageGLES2::light_set_cull_mask(RID p_light, uint32_t p_mask) {
+}
+
+void RasterizerStorageGLES2::light_set_reverse_cull_face_mode(RID p_light, bool p_enabled) {
+}
+
+void RasterizerStorageGLES2::light_omni_set_shadow_mode(RID p_light, VS::LightOmniShadowMode p_mode) {
+}
+
+VS::LightOmniShadowMode RasterizerStorageGLES2::light_omni_get_shadow_mode(RID p_light) {
+ return VS::LIGHT_OMNI_SHADOW_DUAL_PARABOLOID;
+}
+
+void RasterizerStorageGLES2::light_omni_set_shadow_detail(RID p_light, VS::LightOmniShadowDetail p_detail) {
+}
+
+void RasterizerStorageGLES2::light_directional_set_shadow_mode(RID p_light, VS::LightDirectionalShadowMode p_mode) {
+}
+
+void RasterizerStorageGLES2::light_directional_set_blend_splits(RID p_light, bool p_enable) {
+}
+
+bool RasterizerStorageGLES2::light_directional_get_blend_splits(RID p_light) const {
+ return false;
+}
+
+VS::LightDirectionalShadowMode RasterizerStorageGLES2::light_directional_get_shadow_mode(RID p_light) {
+ return VS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL;
+}
+
+void RasterizerStorageGLES2::light_directional_set_shadow_depth_range_mode(RID p_light, VS::LightDirectionalShadowDepthRangeMode p_range_mode) {
+}
+
+VS::LightDirectionalShadowDepthRangeMode RasterizerStorageGLES2::light_directional_get_shadow_depth_range_mode(RID p_light) const {
+ return VS::LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE;
+}
+
+VS::LightType RasterizerStorageGLES2::light_get_type(RID p_light) const {
+ return VS::LIGHT_DIRECTIONAL;
+}
+
+float RasterizerStorageGLES2::light_get_param(RID p_light, VS::LightParam p_param) {
+
+ return VS::LIGHT_DIRECTIONAL;
+}
+
+Color RasterizerStorageGLES2::light_get_color(RID p_light) {
+ return Color();
+}
+
+bool RasterizerStorageGLES2::light_has_shadow(RID p_light) const {
+
+ return VS::LIGHT_DIRECTIONAL;
+}
+
+uint64_t RasterizerStorageGLES2::light_get_version(RID p_light) const {
+ return 0;
+}
+
+AABB RasterizerStorageGLES2::light_get_aabb(RID p_light) const {
+ return AABB();
+}
+
+/* PROBE API */
+
+RID RasterizerStorageGLES2::reflection_probe_create() {
+ return RID();
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_update_mode(RID p_probe, VS::ReflectionProbeUpdateMode p_mode) {
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_intensity(RID p_probe, float p_intensity) {
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_interior_ambient(RID p_probe, const Color &p_ambient) {
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_interior_ambient_energy(RID p_probe, float p_energy) {
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_interior_ambient_probe_contribution(RID p_probe, float p_contrib) {
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_max_distance(RID p_probe, float p_distance) {
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_extents(RID p_probe, const Vector3 &p_extents) {
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_origin_offset(RID p_probe, const Vector3 &p_offset) {
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_as_interior(RID p_probe, bool p_enable) {
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_enable_box_projection(RID p_probe, bool p_enable) {
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_enable_shadows(RID p_probe, bool p_enable) {
+}
+
+void RasterizerStorageGLES2::reflection_probe_set_cull_mask(RID p_probe, uint32_t p_layers) {
+}
+
+AABB RasterizerStorageGLES2::reflection_probe_get_aabb(RID p_probe) const {
+ return AABB();
+}
+VS::ReflectionProbeUpdateMode RasterizerStorageGLES2::reflection_probe_get_update_mode(RID p_probe) const {
+ return VS::REFLECTION_PROBE_UPDATE_ALWAYS;
+}
+
+uint32_t RasterizerStorageGLES2::reflection_probe_get_cull_mask(RID p_probe) const {
+ return 0;
+}
+
+Vector3 RasterizerStorageGLES2::reflection_probe_get_extents(RID p_probe) const {
+ return Vector3();
+}
+Vector3 RasterizerStorageGLES2::reflection_probe_get_origin_offset(RID p_probe) const {
+ return Vector3();
+}
+
+bool RasterizerStorageGLES2::reflection_probe_renders_shadows(RID p_probe) const {
+ return false;
+}
+
+float RasterizerStorageGLES2::reflection_probe_get_origin_max_distance(RID p_probe) const {
+ return 0;
+}
+
+RID RasterizerStorageGLES2::gi_probe_create() {
+ return RID();
+}
+
+void RasterizerStorageGLES2::gi_probe_set_bounds(RID p_probe, const AABB &p_bounds) {
+}
+
+AABB RasterizerStorageGLES2::gi_probe_get_bounds(RID p_probe) const {
+ return AABB();
+}
+
+void RasterizerStorageGLES2::gi_probe_set_cell_size(RID p_probe, float p_size) {
+}
+
+float RasterizerStorageGLES2::gi_probe_get_cell_size(RID p_probe) const {
+ return 0.0;
+}
+
+void RasterizerStorageGLES2::gi_probe_set_to_cell_xform(RID p_probe, const Transform &p_xform) {
+}
+
+Transform RasterizerStorageGLES2::gi_probe_get_to_cell_xform(RID p_probe) const {
+ return Transform();
+}
+
+void RasterizerStorageGLES2::gi_probe_set_dynamic_data(RID p_probe, const PoolVector<int> &p_data) {
+}
+
+PoolVector<int> RasterizerStorageGLES2::gi_probe_get_dynamic_data(RID p_probe) const {
+ return PoolVector<int>();
+}
+
+void RasterizerStorageGLES2::gi_probe_set_dynamic_range(RID p_probe, int p_range) {
+}
+
+int RasterizerStorageGLES2::gi_probe_get_dynamic_range(RID p_probe) const {
+ return 0;
+}
+
+void RasterizerStorageGLES2::gi_probe_set_energy(RID p_probe, float p_range) {
+}
+
+void RasterizerStorageGLES2::gi_probe_set_bias(RID p_probe, float p_range) {
+}
+
+void RasterizerStorageGLES2::gi_probe_set_normal_bias(RID p_probe, float p_range) {
+}
+
+void RasterizerStorageGLES2::gi_probe_set_propagation(RID p_probe, float p_range) {
+}
+
+void RasterizerStorageGLES2::gi_probe_set_interior(RID p_probe, bool p_enable) {
+}
+
+bool RasterizerStorageGLES2::gi_probe_is_interior(RID p_probe) const {
+ return false;
+}
+
+void RasterizerStorageGLES2::gi_probe_set_compress(RID p_probe, bool p_enable) {
+}
+
+bool RasterizerStorageGLES2::gi_probe_is_compressed(RID p_probe) const {
+ return false;
+}
+float RasterizerStorageGLES2::gi_probe_get_energy(RID p_probe) const {
+ return 0;
+}
+
+float RasterizerStorageGLES2::gi_probe_get_bias(RID p_probe) const {
+ return 0;
+}
+
+float RasterizerStorageGLES2::gi_probe_get_normal_bias(RID p_probe) const {
+ return 0;
+}
+
+float RasterizerStorageGLES2::gi_probe_get_propagation(RID p_probe) const {
+ return 0;
+}
+
+uint32_t RasterizerStorageGLES2::gi_probe_get_version(RID p_probe) {
+ return 0;
+}
+
+RasterizerStorage::GIProbeCompression RasterizerStorageGLES2::gi_probe_get_dynamic_data_get_preferred_compression() const {
+ return GI_PROBE_UNCOMPRESSED;
+}
+
+RID RasterizerStorageGLES2::gi_probe_dynamic_data_create(int p_width, int p_height, int p_depth, GIProbeCompression p_compression) {
+ return RID();
+}
+
+void RasterizerStorageGLES2::gi_probe_dynamic_data_update(RID p_gi_probe_data, int p_depth_slice, int p_slice_count, int p_mipmap, const void *p_data) {
+}
+
+///////
+
+RID RasterizerStorageGLES2::lightmap_capture_create() {
+ return RID();
+}
+
+void RasterizerStorageGLES2::lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) {
+}
+
+AABB RasterizerStorageGLES2::lightmap_capture_get_bounds(RID p_capture) const {
+ return AABB();
+}
+
+void RasterizerStorageGLES2::lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) {
+}
+
+PoolVector<uint8_t> RasterizerStorageGLES2::lightmap_capture_get_octree(RID p_capture) const {
+ return PoolVector<uint8_t>();
+}
+
+void RasterizerStorageGLES2::lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) {
+}
+
+Transform RasterizerStorageGLES2::lightmap_capture_get_octree_cell_transform(RID p_capture) const {
+ return Transform();
+}
+
+void RasterizerStorageGLES2::lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv) {
+}
+
+int RasterizerStorageGLES2::lightmap_capture_get_octree_cell_subdiv(RID p_capture) const {
+ return 0;
+}
+
+void RasterizerStorageGLES2::lightmap_capture_set_energy(RID p_capture, float p_energy) {
+}
+
+float RasterizerStorageGLES2::lightmap_capture_get_energy(RID p_capture) const {
+ return 0.0;
+}
+
+const PoolVector<RasterizerStorage::LightmapCaptureOctree> *RasterizerStorageGLES2::lightmap_capture_get_octree_ptr(RID p_capture) const {
+ return NULL;
+}
+
+///////
+
+RID RasterizerStorageGLES2::particles_create() {
+ return RID();
+}
+
+void RasterizerStorageGLES2::particles_set_emitting(RID p_particles, bool p_emitting) {
+}
+
+bool RasterizerStorageGLES2::particles_get_emitting(RID p_particles) {
+ return false;
+}
+
+void RasterizerStorageGLES2::particles_set_amount(RID p_particles, int p_amount) {
+}
+
+void RasterizerStorageGLES2::particles_set_lifetime(RID p_particles, float p_lifetime) {
+}
+
+void RasterizerStorageGLES2::particles_set_one_shot(RID p_particles, bool p_one_shot) {
+}
+
+void RasterizerStorageGLES2::particles_set_pre_process_time(RID p_particles, float p_time) {
+}
+
+void RasterizerStorageGLES2::particles_set_explosiveness_ratio(RID p_particles, float p_ratio) {
+}
+
+void RasterizerStorageGLES2::particles_set_randomness_ratio(RID p_particles, float p_ratio) {
+}
+
+void RasterizerStorageGLES2::particles_set_custom_aabb(RID p_particles, const AABB &p_aabb) {
+}
+
+void RasterizerStorageGLES2::particles_set_speed_scale(RID p_particles, float p_scale) {
+}
+
+void RasterizerStorageGLES2::particles_set_use_local_coordinates(RID p_particles, bool p_enable) {
+}
+
+void RasterizerStorageGLES2::particles_set_fixed_fps(RID p_particles, int p_fps) {
+}
+
+void RasterizerStorageGLES2::particles_set_fractional_delta(RID p_particles, bool p_enable) {
+}
+
+void RasterizerStorageGLES2::particles_set_process_material(RID p_particles, RID p_material) {
+}
+
+void RasterizerStorageGLES2::particles_set_draw_order(RID p_particles, VS::ParticlesDrawOrder p_order) {
+}
+
+void RasterizerStorageGLES2::particles_set_draw_passes(RID p_particles, int p_passes) {
+}
+
+void RasterizerStorageGLES2::particles_set_draw_pass_mesh(RID p_particles, int p_pass, RID p_mesh) {
+}
+
+void RasterizerStorageGLES2::particles_restart(RID p_particles) {
+}
+
+void RasterizerStorageGLES2::particles_request_process(RID p_particles) {
+}
+
+AABB RasterizerStorageGLES2::particles_get_current_aabb(RID p_particles) {
+ return AABB();
+}
+
+AABB RasterizerStorageGLES2::particles_get_aabb(RID p_particles) const {
+ return AABB();
+}
+
+void RasterizerStorageGLES2::particles_set_emission_transform(RID p_particles, const Transform &p_transform) {
+}
+
+int RasterizerStorageGLES2::particles_get_draw_passes(RID p_particles) const {
+ return 0;
+}
+
+RID RasterizerStorageGLES2::particles_get_draw_pass_mesh(RID p_particles, int p_pass) const {
+ return RID();
+}
+
+void RasterizerStorageGLES2::update_particles() {
+}
+
+////////
+
+void RasterizerStorageGLES2::instance_add_skeleton(RID p_skeleton, RasterizerScene::InstanceBase *p_instance) {
+}
+
+void RasterizerStorageGLES2::instance_remove_skeleton(RID p_skeleton, RasterizerScene::InstanceBase *p_instance) {
+}
+
+void RasterizerStorageGLES2::instance_add_dependency(RID p_base, RasterizerScene::InstanceBase *p_instance) {
+}
+
+void RasterizerStorageGLES2::instance_remove_dependency(RID p_base, RasterizerScene::InstanceBase *p_instance) {
+}
+
+/* RENDER TARGET */
+
+void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) {
+
+ if (rt->width <= 0 || rt->height <= 0)
+ return;
+
+ Texture *texture = texture_owner.getornull(rt->texture);
+ ERR_FAIL_COND(!texture);
+
+ // create fbo
+
+ glGenFramebuffers(1, &rt->fbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, rt->fbo);
+
+ // color
+
+ glGenTextures(1, &rt->color);
+ glBindTexture(GL_TEXTURE_2D, rt->color);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, rt->width, rt->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+
+ if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ } else {
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ }
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, rt->color, 0);
+
+ // depth
+
+ glGenRenderbuffers(1, &rt->depth);
+ glBindRenderbuffer(GL_RENDERBUFFER, rt->depth);
+ glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, rt->width, rt->height);
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rt->depth);
+
+ GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
+
+ if (status != GL_FRAMEBUFFER_COMPLETE) {
+
+ glDeleteRenderbuffers(1, &rt->fbo);
+ glDeleteTextures(1, &rt->depth);
+ glDeleteTextures(1, &rt->color);
+ rt->fbo = 0;
+ rt->width = 0;
+ rt->height = 0;
+ rt->color = 0;
+ rt->depth = 0;
+ texture->tex_id = 0;
+ texture->active = false;
+ WARN_PRINT("Could not create framebuffer!!");
+ return;
+ }
+
+ texture->format = Image::FORMAT_RGBA8;
+ texture->gl_format_cache = GL_RGBA;
+ texture->gl_type_cache = GL_UNSIGNED_BYTE;
+ texture->gl_internal_format_cache = GL_RGBA;
+ texture->tex_id = rt->color;
+ texture->width = rt->width;
+ texture->alloc_width = rt->width;
+ texture->height = rt->height;
+ texture->alloc_height = rt->height;
+ texture->active = true;
+
+ texture_set_flags(rt->texture, texture->flags);
+
+ // copy texscreen buffers
+ {
+ int w = rt->width;
+ int h = rt->height;
+
+ glGenTextures(1, &rt->copy_screen_effect.color);
+ glBindTexture(GL_TEXTURE_2D, rt->copy_screen_effect.color);
+
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+
+ glGenFramebuffers(1, &rt->copy_screen_effect.fbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, rt->copy_screen_effect.fbo);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, rt->color, 0);
+
+ GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
+ if (status != GL_FRAMEBUFFER_COMPLETE) {
+ _render_target_clear(rt);
+ ERR_FAIL_COND(status != GL_FRAMEBUFFER_COMPLETE);
+ }
+ }
+
+ glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES2::system_fbo);
+}
+
+void RasterizerStorageGLES2::_render_target_clear(RenderTarget *rt) {
+
+ if (rt->fbo) {
+ glDeleteFramebuffers(1, &rt->fbo);
+ glDeleteTextures(1, &rt->color);
+ rt->fbo = 0;
+ }
+
+ if (rt->depth) {
+ glDeleteRenderbuffers(1, &rt->depth);
+ rt->depth = 0;
+ }
+
+ Texture *tex = texture_owner.get(rt->texture);
+ tex->alloc_height = 0;
+ tex->alloc_width = 0;
+ tex->width = 0;
+ tex->height = 0;
+ tex->active = false;
+
+ // TODO hardcoded texscreen copy effect
+ if (rt->copy_screen_effect.color) {
+ glDeleteFramebuffers(1, &rt->copy_screen_effect.fbo);
+ rt->copy_screen_effect.fbo = 0;
+
+ glDeleteTextures(1, &rt->copy_screen_effect.color);
+ rt->copy_screen_effect.color = 0;
+ }
+}
+
+RID RasterizerStorageGLES2::render_target_create() {
+
+ RenderTarget *rt = memnew(RenderTarget);
+
+ Texture *t = memnew(Texture);
+
+ t->flags = 0;
+ t->width = 0;
+ t->height = 0;
+ t->alloc_height = 0;
+ t->alloc_width = 0;
+ t->format = Image::FORMAT_R8;
+ t->target = GL_TEXTURE_2D;
+ t->gl_format_cache = 0;
+ t->gl_internal_format_cache = 0;
+ t->gl_type_cache = 0;
+ t->data_size = 0;
+ t->total_data_size = 0;
+ t->ignore_mipmaps = false;
+ t->mipmaps = 1;
+ t->active = true;
+ t->tex_id = 0;
+ t->render_target = rt;
+
+ rt->texture = texture_owner.make_rid(t);
+
+ return render_target_owner.make_rid(rt);
+}
+
+void RasterizerStorageGLES2::render_target_set_size(RID p_render_target, int p_width, int p_height) {
+
+ RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ ERR_FAIL_COND(!rt);
+
+ if (p_width == rt->width && p_height == rt->height)
+ return;
+
+ _render_target_clear(rt);
+
+ rt->width = p_width;
+ rt->height = p_height;
+
+ _render_target_allocate(rt);
+}
+
+RID RasterizerStorageGLES2::render_target_get_texture(RID p_render_target) const {
+
+ RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ ERR_FAIL_COND_V(!rt, RID());
+
+ return rt->texture;
+}
+
+void RasterizerStorageGLES2::render_target_set_flag(RID p_render_target, RenderTargetFlags p_flag, bool p_value) {
+ RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ ERR_FAIL_COND(!rt);
+
+ rt->flags[p_flag] = p_value;
+
+ switch (p_flag) {
+ case RENDER_TARGET_HDR:
+ case RENDER_TARGET_NO_3D:
+ case RENDER_TARGET_NO_SAMPLING:
+ case RENDER_TARGET_NO_3D_EFFECTS: {
+ //must reset for these formats
+ _render_target_clear(rt);
+ _render_target_allocate(rt);
+
+ } break;
+ default: {}
+ }
+}
+
+bool RasterizerStorageGLES2::render_target_was_used(RID p_render_target) {
+ RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ ERR_FAIL_COND_V(!rt, false);
+
+ return rt->used_in_frame;
+}
+
+void RasterizerStorageGLES2::render_target_clear_used(RID p_render_target) {
+ RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ ERR_FAIL_COND(!rt);
+
+ rt->used_in_frame = false;
+}
+
+void RasterizerStorageGLES2::render_target_set_msaa(RID p_render_target, VS::ViewportMSAA p_msaa) {
+ RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ ERR_FAIL_COND(!rt);
+
+ if (rt->msaa == p_msaa)
+ return;
+
+ _render_target_clear(rt);
+ rt->msaa = p_msaa;
+ _render_target_allocate(rt);
+}
+
+/* CANVAS SHADOW */
+
+RID RasterizerStorageGLES2::canvas_light_shadow_buffer_create(int p_width) {
+ return RID();
+}
+
+/* LIGHT SHADOW MAPPING */
+
+RID RasterizerStorageGLES2::canvas_light_occluder_create() {
+ return RID();
+}
+
+void RasterizerStorageGLES2::canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2> &p_lines) {
+}
+
+VS::InstanceType RasterizerStorageGLES2::get_base_type(RID p_rid) const {
+ return VS::INSTANCE_NONE;
+}
+
+bool RasterizerStorageGLES2::free(RID p_rid) {
+ return false;
+}
+
+bool RasterizerStorageGLES2::has_os_feature(const String &p_feature) const {
+ return false;
+}
+
+////////////////////////////////////////////
+
+void RasterizerStorageGLES2::set_debug_generate_wireframes(bool p_generate) {
+}
+
+void RasterizerStorageGLES2::render_info_begin_capture() {
+}
+
+void RasterizerStorageGLES2::render_info_end_capture() {
+}
+
+int RasterizerStorageGLES2::get_captured_render_info(VS::RenderInfo p_info) {
+
+ return get_render_info(p_info);
+}
+
+int RasterizerStorageGLES2::get_render_info(VS::RenderInfo p_info) {
+ return 0;
+}
+
+void RasterizerStorageGLES2::initialize() {
+ RasterizerStorageGLES2::system_fbo = 0;
+
+ {
+ const char *gl_extensions = (const char *)glGetString(GL_EXTENSIONS);
+ Vector<String> strings = String(gl_extensions).split(" ", false);
+ for (int i = 0; i < strings.size(); i++) {
+ config.extensions.insert(strings[i]);
+ }
+ }
+
+ frame.count = 0;
+ frame.prev_tick = 0;
+ frame.delta = 0;
+ frame.current_rt = NULL;
+ frame.clear_request = false;
+ // config.keep_original_textures = false;
+
+ glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &config.max_texture_image_units);
+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &config.max_texture_size);
+
+ shaders.copy.init();
+
+ {
+ //default textures
+
+ glGenTextures(1, &resources.white_tex);
+ unsigned char whitetexdata[8 * 8 * 3];
+ for (int i = 0; i < 8 * 8 * 3; i++) {
+ whitetexdata[i] = 255;
+ }
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, resources.white_tex);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, GL_RGB, GL_UNSIGNED_BYTE, whitetexdata);
+ glGenerateMipmap(GL_TEXTURE_2D);
+ glBindTexture(GL_TEXTURE_2D, 0);
+
+ glGenTextures(1, &resources.black_tex);
+ unsigned char blacktexdata[8 * 8 * 3];
+ for (int i = 0; i < 8 * 8 * 3; i++) {
+ blacktexdata[i] = 0;
+ }
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, resources.black_tex);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, GL_RGB, GL_UNSIGNED_BYTE, blacktexdata);
+ glGenerateMipmap(GL_TEXTURE_2D);
+ glBindTexture(GL_TEXTURE_2D, 0);
+
+ glGenTextures(1, &resources.normal_tex);
+ unsigned char normaltexdata[8 * 8 * 3];
+ for (int i = 0; i < 8 * 8 * 3; i += 3) {
+ normaltexdata[i + 0] = 128;
+ normaltexdata[i + 1] = 128;
+ normaltexdata[i + 2] = 255;
+ }
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, resources.normal_tex);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, GL_RGB, GL_UNSIGNED_BYTE, normaltexdata);
+ glGenerateMipmap(GL_TEXTURE_2D);
+ glBindTexture(GL_TEXTURE_2D, 0);
+
+ glGenTextures(1, &resources.aniso_tex);
+ unsigned char anisotexdata[8 * 8 * 3];
+ for (int i = 0; i < 8 * 8 * 3; i += 3) {
+ anisotexdata[i + 0] = 255;
+ anisotexdata[i + 1] = 128;
+ anisotexdata[i + 2] = 0;
+ }
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, resources.aniso_tex);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, GL_RGB, GL_UNSIGNED_BYTE, anisotexdata);
+ glGenerateMipmap(GL_TEXTURE_2D);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ }
+}
+
+void RasterizerStorageGLES2::finalize() {
+}
+
+void RasterizerStorageGLES2::update_dirty_resources() {
+ update_dirty_shaders();
+ update_dirty_materials();
+}
+
+RasterizerStorageGLES2::RasterizerStorageGLES2() {
+ RasterizerStorageGLES2::system_fbo = 0;
+}
diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h
new file mode 100644
index 0000000000..c3c3a391d4
--- /dev/null
+++ b/drivers/gles2/rasterizer_storage_gles2.h
@@ -0,0 +1,838 @@
+/*************************************************************************/
+/* rasterizer_storage_gles2.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 RASTERIZERSTORAGEGLES2_H
+#define RASTERIZERSTORAGEGLES2_H
+
+#include "self_list.h"
+#include "servers/visual/rasterizer.h"
+#include "servers/visual/shader_language.h"
+#include "shader_compiler_gles2.h"
+#include "shader_gles2.h"
+
+#include "shaders/copy.glsl.gen.h"
+/*
+#include "shaders/blend_shape.glsl.gen.h"
+#include "shaders/canvas.glsl.gen.h"
+#include "shaders/copy.glsl.gen.h"
+#include "shaders/cubemap_filter.glsl.gen.h"
+#include "shaders/particles.glsl.gen.h"
+*/
+
+class RasterizerCanvasGLES2;
+class RasterizerSceneGLES2;
+
+class RasterizerStorageGLES2 : public RasterizerStorage {
+public:
+ RasterizerCanvasGLES2 *canvas;
+ RasterizerSceneGLES2 *scene;
+
+ static GLuint system_fbo;
+
+ struct Config {
+
+ bool shrink_textures_x2;
+ bool use_fast_texture_filter;
+ // bool use_anisotropic_filter;
+
+ bool hdr_supported;
+
+ bool use_rgba_2d_shadows;
+
+ // float anisotropic_level;
+
+ int max_texture_image_units;
+ int max_texture_size;
+
+ bool generate_wireframes;
+
+ bool use_texture_array_environment;
+
+ Set<String> extensions;
+
+ bool keep_original_textures;
+
+ bool no_depth_prepass;
+ bool force_vertex_shading;
+ } config;
+
+ struct Resources {
+
+ GLuint white_tex;
+ GLuint black_tex;
+ GLuint normal_tex;
+ GLuint aniso_tex;
+
+ GLuint quadie;
+ GLuint quadie_array;
+
+ } resources;
+
+ mutable struct Shaders {
+
+ ShaderCompilerGLES2 compiler;
+
+ CopyShaderGLES2 copy;
+
+ ShaderCompilerGLES2::IdentifierActions actions_canvas;
+ ShaderCompilerGLES2::IdentifierActions actions_scene;
+ ShaderCompilerGLES2::IdentifierActions actions_particles;
+
+ } shaders;
+
+ struct Info {
+
+ uint64_t texture_mem;
+ uint64_t vertex_mem;
+
+ struct Render {
+ uint32_t object_count;
+ uint32_t draw_call_count;
+ uint32_t material_switch_count;
+ uint32_t surface_switch_count;
+ uint32_t shader_rebind_count;
+ uint32_t vertices_count;
+
+ void reset() {
+ object_count = 0;
+ draw_call_count = 0;
+ material_switch_count = 0;
+ surface_switch_count = 0;
+ shader_rebind_count = 0;
+ vertices_count = 0;
+ }
+ } render, render_final, snap;
+
+ Info() {
+
+ texture_mem = 0;
+ vertex_mem = 0;
+ render.reset();
+ render_final.reset();
+ }
+
+ } info;
+
+ /////////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////DATA///////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////API////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////////////////////////////
+
+ /* TEXTURE API */
+
+ struct RenderTarget;
+
+ struct Texture : RID_Data {
+
+ Texture *proxy;
+ Set<Texture *> proxy_owners;
+
+ String path;
+ uint32_t flags;
+ int width, height;
+ int alloc_width, alloc_height;
+ Image::Format format;
+
+ GLenum target;
+ GLenum gl_format_cache;
+ GLenum gl_internal_format_cache;
+ GLenum gl_type_cache;
+
+ int data_size;
+ int total_data_size;
+ bool ignore_mipmaps;
+
+ int mipmaps;
+
+ bool active;
+ GLenum tex_id;
+
+ uint16_t stored_cube_sides;
+
+ RenderTarget *render_target;
+
+ Ref<Image> images[6];
+
+ Texture() {
+ flags = 0;
+ width = 0;
+ height = 0;
+ alloc_width = 0;
+ alloc_height = 0;
+ format = Image::FORMAT_L8;
+
+ target = 0;
+
+ data_size = 0;
+ total_data_size = 0;
+ ignore_mipmaps = false;
+
+ active = false;
+
+ tex_id = 0;
+
+ stored_cube_sides = 0;
+
+ proxy = NULL;
+
+ render_target = NULL;
+ }
+
+ _ALWAYS_INLINE_ Texture *get_ptr() {
+ if (proxy) {
+ return proxy; //->get_ptr(); only one level of indirection, else not inlining possible.
+ } else {
+ return this;
+ }
+ }
+
+ ~Texture() {
+ if (tex_id != 0) {
+ glDeleteTextures(1, &tex_id);
+ }
+
+ for (Set<Texture *>::Element *E = proxy_owners.front(); E; E = E->next()) {
+ E->get()->proxy = NULL;
+ }
+
+ if (proxy) {
+ proxy->proxy_owners.erase(this);
+ }
+ }
+ };
+
+ mutable RID_Owner<Texture> texture_owner;
+
+ Ref<Image> _get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type);
+
+ virtual RID texture_create();
+ virtual void texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags = VS::TEXTURE_FLAGS_DEFAULT);
+ virtual void texture_set_data(RID p_texture, const Ref<Image> &p_image, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT);
+ virtual Ref<Image> texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) const;
+ virtual void texture_set_flags(RID p_texture, uint32_t p_flags);
+ virtual uint32_t texture_get_flags(RID p_texture) const;
+ virtual Image::Format texture_get_format(RID p_texture) const;
+ virtual uint32_t texture_get_texid(RID p_texture) const;
+ virtual uint32_t texture_get_width(RID p_texture) const;
+ virtual uint32_t texture_get_height(RID p_texture) const;
+ virtual void texture_set_size_override(RID p_texture, int p_width, int p_height);
+
+ virtual void texture_set_path(RID p_texture, const String &p_path);
+ virtual String texture_get_path(RID p_texture) const;
+
+ virtual void texture_set_shrink_all_x2_on_set_data(bool p_enable);
+
+ virtual void texture_debug_usage(List<VS::TextureInfo> *r_info);
+
+ virtual RID texture_create_radiance_cubemap(RID p_source, int p_resolution = -1) const;
+
+ virtual void textures_keep_original(bool p_enable);
+
+ virtual void texture_set_proxy(RID p_texture, RID p_proxy);
+
+ virtual void texture_set_detect_3d_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata);
+ virtual void texture_set_detect_srgb_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata);
+ virtual void texture_set_detect_normal_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata);
+
+ /* SKY API */
+
+ virtual RID sky_create();
+ virtual void sky_set_texture(RID p_sky, RID p_panorama, int p_radiance_size);
+
+ /* SHADER API */
+
+ struct Material;
+
+ struct Shader : public RID_Data {
+
+ RID self;
+
+ VS::ShaderMode mode;
+ ShaderGLES2 *shader;
+ String code;
+ SelfList<Material>::List materials;
+
+ Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms;
+
+ uint32_t texture_count;
+
+ uint32_t custom_code_id;
+ uint32_t version;
+
+ SelfList<Shader> dirty_list;
+
+ Map<StringName, RID> default_textures;
+
+ Vector<ShaderLanguage::ShaderNode::Uniform::Hint> texture_hints;
+
+ bool valid;
+
+ String path;
+
+ struct CanvasItem {
+
+ enum BlendMode {
+ BLEND_MODE_MIX,
+ BLEND_MODE_ADD,
+ BLEND_MODE_SUB,
+ BLEND_MODE_MUL,
+ BLEND_MODE_PMALPHA,
+ };
+
+ int blend_mode;
+
+ /*
+ enum LightMode {
+ LIGHT_MODE_NORMAL,
+ LIGHT_MODE_UNSHADED,
+ LIGHT_MODE_LIGHT_ONLY
+ };
+
+ int light_mode;
+ */
+ bool uses_screen_texture;
+ bool uses_screen_uv;
+ bool uses_time;
+
+ } canvas_item;
+
+ /*
+ struct Spatial {
+
+ enum BlendMode {
+ BLEND_MODE_MIX,
+ BLEND_MODE_ADD,
+ BLEND_MODE_SUB,
+ BLEND_MODE_MUL,
+ };
+
+ int blend_mode;
+
+ enum DepthDrawMode {
+ DEPTH_DRAW_OPAQUE,
+ DEPTH_DRAW_ALWAYS,
+ DEPTH_DRAW_NEVER,
+ DEPTH_DRAW_ALPHA_PREPASS,
+ };
+
+ int depth_draw_mode;
+
+ enum CullMode {
+ CULL_MODE_FRONT,
+ CULL_MODE_BACK,
+ CULL_MODE_DISABLED,
+ };
+
+ int cull_mode;
+
+ bool uses_alpha;
+ bool uses_alpha_scissor;
+ bool unshaded;
+ bool no_depth_test;
+ bool uses_vertex;
+ bool uses_discard;
+ bool uses_sss;
+ bool uses_screen_texture;
+ bool uses_time;
+ bool writes_modelview_or_projection;
+ bool uses_vertex_lighting;
+ bool uses_world_coordinates;
+
+ } spatial;
+
+ struct Particles {
+
+ } particles;
+ */
+
+ bool uses_vertex_time;
+ bool uses_fragment_time;
+
+ Shader() :
+ dirty_list(this) {
+
+ shader = NULL;
+ valid = false;
+ custom_code_id = 0;
+ version = 1;
+ }
+ };
+
+ mutable RID_Owner<Shader> shader_owner;
+ mutable SelfList<Shader>::List _shader_dirty_list;
+
+ void _shader_make_dirty(Shader *p_shader);
+
+ virtual RID shader_create();
+
+ virtual void shader_set_code(RID p_shader, const String &p_code);
+ virtual String shader_get_code(RID p_shader) const;
+ virtual void shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const;
+
+ virtual void shader_set_default_texture_param(RID p_shader, const StringName &p_name, RID p_texture);
+ virtual RID shader_get_default_texture_param(RID p_shader, const StringName &p_name) const;
+
+ void _update_shader(Shader *p_shader) const;
+ void update_dirty_shaders();
+
+ /* COMMON MATERIAL API */
+
+ struct Material : public RID_Data {
+
+ Shader *shader;
+ Map<StringName, Variant> params;
+ SelfList<Material> list;
+ SelfList<Material> dirty_list;
+ Vector<RID> textures;
+ float line_width;
+ int render_priority;
+
+ RID next_pass;
+
+ uint32_t index;
+ uint64_t last_pass;
+
+ Map<Geometry *, int> geometry_owners;
+ Map<RasterizerScene::InstanceBase *, int> instance_owners;
+
+ bool can_cast_shadow_cache;
+ bool is_animated_cache;
+
+ Material() :
+ list(this),
+ dirty_list(this) {
+ can_cast_shadow_cache = false;
+ is_animated_cache = false;
+ shader = NULL;
+ line_width = 1.0;
+ last_pass = 0;
+ render_priority = 0;
+ }
+ };
+
+ mutable SelfList<Material>::List _material_dirty_list;
+ void _material_make_dirty(Material *p_material) const;
+
+ mutable RID_Owner<Material> material_owner;
+
+ virtual RID material_create();
+
+ virtual void material_set_shader(RID p_material, RID p_shader);
+ virtual RID material_get_shader(RID p_material) const;
+
+ virtual void material_set_param(RID p_material, const StringName &p_param, const Variant &p_value);
+ virtual Variant material_get_param(RID p_material, const StringName &p_param) const;
+
+ virtual void material_set_line_width(RID p_material, float p_width);
+ virtual void material_set_next_pass(RID p_material, RID p_next_material);
+
+ virtual bool material_is_animated(RID p_material);
+ virtual bool material_casts_shadows(RID p_material);
+
+ virtual void material_add_instance_owner(RID p_material, RasterizerScene::InstanceBase *p_instance);
+ virtual void material_remove_instance_owner(RID p_material, RasterizerScene::InstanceBase *p_instance);
+
+ virtual void material_set_render_priority(RID p_material, int priority);
+
+ void update_dirty_materials();
+
+ /* MESH API */
+ virtual RID mesh_create();
+
+ virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes = Vector<PoolVector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>());
+
+ virtual void mesh_set_blend_shape_count(RID p_mesh, int p_amount);
+ virtual int mesh_get_blend_shape_count(RID p_mesh) const;
+
+ virtual void mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode);
+ virtual VS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const;
+
+ virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data);
+
+ virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material);
+ virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const;
+
+ virtual int mesh_surface_get_array_len(RID p_mesh, int p_surface) const;
+ virtual int mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const;
+
+ virtual PoolVector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const;
+ virtual PoolVector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const;
+
+ virtual uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const;
+ virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const;
+
+ virtual AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const;
+ virtual Vector<PoolVector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const;
+ virtual Vector<AABB> mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const;
+
+ virtual void mesh_remove_surface(RID p_mesh, int p_surface);
+ virtual int mesh_get_surface_count(RID p_mesh) const;
+
+ virtual void mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb);
+ virtual AABB mesh_get_custom_aabb(RID p_mesh) const;
+
+ virtual AABB mesh_get_aabb(RID p_mesh, RID p_skeleton) const;
+ virtual void mesh_clear(RID p_mesh);
+
+ /* MULTIMESH API */
+
+ virtual RID multimesh_create();
+
+ virtual void multimesh_allocate(RID p_multimesh, int p_instances, VS::MultimeshTransformFormat p_transform_format, VS::MultimeshColorFormat p_color_format);
+ virtual int multimesh_get_instance_count(RID p_multimesh) const;
+
+ virtual void multimesh_set_mesh(RID p_multimesh, RID p_mesh);
+ virtual void multimesh_instance_set_transform(RID p_multimesh, int p_index, const Transform &p_transform);
+ virtual void multimesh_instance_set_transform_2d(RID p_multimesh, int p_index, const Transform2D &p_transform);
+ virtual void multimesh_instance_set_color(RID p_multimesh, int p_index, const Color &p_color);
+
+ virtual RID multimesh_get_mesh(RID p_multimesh) const;
+
+ virtual Transform multimesh_instance_get_transform(RID p_multimesh, int p_index) const;
+ virtual Transform2D multimesh_instance_get_transform_2d(RID p_multimesh, int p_index) const;
+ virtual Color multimesh_instance_get_color(RID p_multimesh, int p_index) const;
+
+ virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible);
+ virtual int multimesh_get_visible_instances(RID p_multimesh) const;
+
+ virtual AABB multimesh_get_aabb(RID p_multimesh) const;
+
+ void update_dirty_multimeshes();
+
+ /* IMMEDIATE API */
+
+ virtual RID immediate_create();
+ virtual void immediate_begin(RID p_immediate, VS::PrimitiveType p_rimitive, RID p_texture = RID());
+ virtual void immediate_vertex(RID p_immediate, const Vector3 &p_vertex);
+ virtual void immediate_normal(RID p_immediate, const Vector3 &p_normal);
+ virtual void immediate_tangent(RID p_immediate, const Plane &p_tangent);
+ virtual void immediate_color(RID p_immediate, const Color &p_color);
+ virtual void immediate_uv(RID p_immediate, const Vector2 &tex_uv);
+ virtual void immediate_uv2(RID p_immediate, const Vector2 &tex_uv);
+ virtual void immediate_end(RID p_immediate);
+ virtual void immediate_clear(RID p_immediate);
+ virtual void immediate_set_material(RID p_immediate, RID p_material);
+ virtual RID immediate_get_material(RID p_immediate) const;
+ virtual AABB immediate_get_aabb(RID p_immediate) const;
+
+ /* SKELETON API */
+
+ void update_dirty_skeletons();
+
+ virtual RID skeleton_create();
+ virtual void skeleton_allocate(RID p_skeleton, int p_bones, bool p_2d_skeleton = false);
+ virtual int skeleton_get_bone_count(RID p_skeleton) const;
+ virtual void skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform);
+ virtual Transform skeleton_bone_get_transform(RID p_skeleton, int p_bone) const;
+ virtual void skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform);
+ virtual Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const;
+
+ /* Light API */
+
+ virtual RID light_create(VS::LightType p_type);
+
+ virtual void light_set_color(RID p_light, const Color &p_color);
+ virtual void light_set_param(RID p_light, VS::LightParam p_param, float p_value);
+ virtual void light_set_shadow(RID p_light, bool p_enabled);
+ virtual void light_set_shadow_color(RID p_light, const Color &p_color);
+ virtual void light_set_projector(RID p_light, RID p_texture);
+ virtual void light_set_negative(RID p_light, bool p_enable);
+ virtual void light_set_cull_mask(RID p_light, uint32_t p_mask);
+ virtual void light_set_reverse_cull_face_mode(RID p_light, bool p_enabled);
+
+ virtual void light_omni_set_shadow_mode(RID p_light, VS::LightOmniShadowMode p_mode);
+ virtual void light_omni_set_shadow_detail(RID p_light, VS::LightOmniShadowDetail p_detail);
+
+ virtual void light_directional_set_shadow_mode(RID p_light, VS::LightDirectionalShadowMode p_mode);
+ virtual void light_directional_set_blend_splits(RID p_light, bool p_enable);
+ virtual bool light_directional_get_blend_splits(RID p_light) const;
+
+ virtual VS::LightDirectionalShadowMode light_directional_get_shadow_mode(RID p_light);
+ virtual VS::LightOmniShadowMode light_omni_get_shadow_mode(RID p_light);
+
+ virtual void light_directional_set_shadow_depth_range_mode(RID p_light, VS::LightDirectionalShadowDepthRangeMode p_range_mode);
+ virtual VS::LightDirectionalShadowDepthRangeMode light_directional_get_shadow_depth_range_mode(RID p_light) const;
+
+ virtual bool light_has_shadow(RID p_light) const;
+
+ virtual VS::LightType light_get_type(RID p_light) const;
+ virtual float light_get_param(RID p_light, VS::LightParam p_param);
+ virtual Color light_get_color(RID p_light);
+
+ virtual AABB light_get_aabb(RID p_light) const;
+ virtual uint64_t light_get_version(RID p_light) const;
+
+ /* PROBE API */
+ virtual RID reflection_probe_create();
+
+ virtual void reflection_probe_set_update_mode(RID p_probe, VS::ReflectionProbeUpdateMode p_mode);
+ virtual void reflection_probe_set_intensity(RID p_probe, float p_intensity);
+ virtual void reflection_probe_set_interior_ambient(RID p_probe, const Color &p_ambient);
+ virtual void reflection_probe_set_interior_ambient_energy(RID p_probe, float p_energy);
+ virtual void reflection_probe_set_interior_ambient_probe_contribution(RID p_probe, float p_contrib);
+ virtual void reflection_probe_set_max_distance(RID p_probe, float p_distance);
+ virtual void reflection_probe_set_extents(RID p_probe, const Vector3 &p_extents);
+ virtual void reflection_probe_set_origin_offset(RID p_probe, const Vector3 &p_offset);
+ virtual void reflection_probe_set_as_interior(RID p_probe, bool p_enable);
+ virtual void reflection_probe_set_enable_box_projection(RID p_probe, bool p_enable);
+ virtual void reflection_probe_set_enable_shadows(RID p_probe, bool p_enable);
+ virtual void reflection_probe_set_cull_mask(RID p_probe, uint32_t p_layers);
+
+ virtual AABB reflection_probe_get_aabb(RID p_probe) const;
+ virtual VS::ReflectionProbeUpdateMode reflection_probe_get_update_mode(RID p_probe) const;
+ virtual uint32_t reflection_probe_get_cull_mask(RID p_probe) const;
+
+ virtual Vector3 reflection_probe_get_extents(RID p_probe) const;
+ virtual Vector3 reflection_probe_get_origin_offset(RID p_probe) const;
+ virtual float reflection_probe_get_origin_max_distance(RID p_probe) const;
+ virtual bool reflection_probe_renders_shadows(RID p_probe) const;
+
+ /* GI PROBE API */
+ virtual RID gi_probe_create();
+
+ virtual void gi_probe_set_bounds(RID p_probe, const AABB &p_bounds);
+ virtual AABB gi_probe_get_bounds(RID p_probe) const;
+
+ virtual void gi_probe_set_cell_size(RID p_probe, float p_size);
+ virtual float gi_probe_get_cell_size(RID p_probe) const;
+
+ virtual void gi_probe_set_to_cell_xform(RID p_probe, const Transform &p_xform);
+ virtual Transform gi_probe_get_to_cell_xform(RID p_probe) const;
+
+ virtual void gi_probe_set_dynamic_data(RID p_probe, const PoolVector<int> &p_data);
+ virtual PoolVector<int> gi_probe_get_dynamic_data(RID p_probe) const;
+
+ virtual void gi_probe_set_dynamic_range(RID p_probe, int p_range);
+ virtual int gi_probe_get_dynamic_range(RID p_probe) const;
+
+ virtual void gi_probe_set_energy(RID p_probe, float p_range);
+ virtual float gi_probe_get_energy(RID p_probe) const;
+
+ virtual void gi_probe_set_bias(RID p_probe, float p_range);
+ virtual float gi_probe_get_bias(RID p_probe) const;
+
+ virtual void gi_probe_set_normal_bias(RID p_probe, float p_range);
+ virtual float gi_probe_get_normal_bias(RID p_probe) const;
+
+ virtual void gi_probe_set_propagation(RID p_probe, float p_range);
+ virtual float gi_probe_get_propagation(RID p_probe) const;
+
+ virtual void gi_probe_set_interior(RID p_probe, bool p_enable);
+ virtual bool gi_probe_is_interior(RID p_probe) const;
+
+ virtual void gi_probe_set_compress(RID p_probe, bool p_enable);
+ virtual bool gi_probe_is_compressed(RID p_probe) const;
+
+ virtual uint32_t gi_probe_get_version(RID p_probe);
+
+ virtual GIProbeCompression gi_probe_get_dynamic_data_get_preferred_compression() const;
+ virtual RID gi_probe_dynamic_data_create(int p_width, int p_height, int p_depth, GIProbeCompression p_compression);
+ virtual void gi_probe_dynamic_data_update(RID p_gi_probe_data, int p_depth_slice, int p_slice_count, int p_mipmap, const void *p_data);
+
+ /* LIGHTMAP */
+
+ virtual RID lightmap_capture_create();
+ virtual void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds);
+ virtual AABB lightmap_capture_get_bounds(RID p_capture) const;
+ virtual void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree);
+ virtual PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const;
+ virtual void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform);
+ virtual Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const;
+ virtual void lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv);
+ virtual int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const;
+ virtual void lightmap_capture_set_energy(RID p_capture, float p_energy);
+ virtual float lightmap_capture_get_energy(RID p_capture) const;
+ virtual const PoolVector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const;
+
+ /* PARTICLES */
+ void update_particles();
+
+ virtual RID particles_create();
+
+ virtual void particles_set_emitting(RID p_particles, bool p_emitting);
+ virtual bool particles_get_emitting(RID p_particles);
+
+ virtual void particles_set_amount(RID p_particles, int p_amount);
+ virtual void particles_set_lifetime(RID p_particles, float p_lifetime);
+ virtual void particles_set_one_shot(RID p_particles, bool p_one_shot);
+ virtual void particles_set_pre_process_time(RID p_particles, float p_time);
+ virtual void particles_set_explosiveness_ratio(RID p_particles, float p_ratio);
+ virtual void particles_set_randomness_ratio(RID p_particles, float p_ratio);
+ virtual void particles_set_custom_aabb(RID p_particles, const AABB &p_aabb);
+ virtual void particles_set_speed_scale(RID p_particles, float p_scale);
+ virtual void particles_set_use_local_coordinates(RID p_particles, bool p_enable);
+ virtual void particles_set_process_material(RID p_particles, RID p_material);
+ virtual void particles_set_fixed_fps(RID p_particles, int p_fps);
+ virtual void particles_set_fractional_delta(RID p_particles, bool p_enable);
+ virtual void particles_restart(RID p_particles);
+
+ virtual void particles_set_draw_order(RID p_particles, VS::ParticlesDrawOrder p_order);
+
+ virtual void particles_set_draw_passes(RID p_particles, int p_passes);
+ virtual void particles_set_draw_pass_mesh(RID p_particles, int p_pass, RID p_mesh);
+
+ virtual void particles_request_process(RID p_particles);
+ virtual AABB particles_get_current_aabb(RID p_particles);
+ virtual AABB particles_get_aabb(RID p_particles) const;
+
+ virtual void particles_set_emission_transform(RID p_particles, const Transform &p_transform);
+
+ virtual int particles_get_draw_passes(RID p_particles) const;
+ virtual RID particles_get_draw_pass_mesh(RID p_particles, int p_pass) const;
+
+ /* INSTANCE */
+
+ virtual void instance_add_skeleton(RID p_skeleton, RasterizerScene::InstanceBase *p_instance);
+ virtual void instance_remove_skeleton(RID p_skeleton, RasterizerScene::InstanceBase *p_instance);
+
+ virtual void instance_add_dependency(RID p_base, RasterizerScene::InstanceBase *p_instance);
+ virtual void instance_remove_dependency(RID p_base, RasterizerScene::InstanceBase *p_instance);
+
+ /* RENDER TARGET */
+
+ struct RenderTarget : public RID_Data {
+ GLuint fbo;
+
+ GLuint color;
+ GLuint depth;
+
+ // TODO post processing effects?
+
+ // TODO HDR?
+
+ // TODO this is hardcoded for texscreen copies for now
+
+ struct Effect {
+ GLuint fbo;
+ int width;
+ int height;
+
+ GLuint color;
+
+ Effect() {
+ fbo = 0;
+ width = 0;
+ height = 0;
+ color = 0;
+ }
+ };
+
+ Effect copy_screen_effect;
+
+ int width, height;
+
+ bool flags[RENDER_TARGET_FLAG_MAX];
+
+ bool used_in_frame;
+ VS::ViewportMSAA msaa;
+
+ RID texture;
+
+ RenderTarget() {
+ fbo = 0;
+
+ color = 0;
+ depth = 0;
+
+ width = 0;
+ height = 0;
+
+ for (int i = 0; i < RENDER_TARGET_FLAG_MAX; i++) {
+ flags[i] = false;
+ }
+
+ used_in_frame = false;
+
+ msaa = VS::VIEWPORT_MSAA_DISABLED;
+ }
+ };
+
+ mutable RID_Owner<RenderTarget> render_target_owner;
+
+ void _render_target_clear(RenderTarget *rt);
+ void _render_target_allocate(RenderTarget *rt);
+
+ virtual RID render_target_create();
+ virtual void render_target_set_size(RID p_render_target, int p_width, int p_height);
+ virtual RID render_target_get_texture(RID p_render_target) const;
+
+ virtual void render_target_set_flag(RID p_render_target, RenderTargetFlags p_flag, bool p_value);
+ virtual bool render_target_was_used(RID p_render_target);
+ virtual void render_target_clear_used(RID p_render_target);
+ virtual void render_target_set_msaa(RID p_render_target, VS::ViewportMSAA p_msaa);
+
+ /* CANVAS SHADOW */
+
+ virtual RID canvas_light_shadow_buffer_create(int p_width);
+
+ /* LIGHT SHADOW MAPPING */
+
+ virtual RID canvas_light_occluder_create();
+ virtual void canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2> &p_lines);
+
+ virtual VS::InstanceType get_base_type(RID p_rid) const;
+
+ virtual bool free(RID p_rid);
+
+ struct Frame {
+
+ RenderTarget *current_rt;
+
+ bool clear_request;
+ Color clear_request_color;
+ int canvas_draw_commands;
+ float time[4];
+ float delta;
+ uint64_t prev_tick;
+ uint64_t count;
+
+ } frame;
+
+ void initialize();
+ void finalize();
+
+ virtual bool has_os_feature(const String &p_feature) const;
+
+ virtual void update_dirty_resources();
+
+ virtual void set_debug_generate_wireframes(bool p_generate);
+
+ virtual void render_info_begin_capture();
+ virtual void render_info_end_capture();
+ virtual int get_captured_render_info(VS::RenderInfo p_info);
+
+ virtual int get_render_info(VS::RenderInfo p_info);
+
+ RasterizerStorageGLES2();
+};
+
+#endif // RASTERIZERSTORAGEGLES2_H
diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp
new file mode 100644
index 0000000000..d2a4226905
--- /dev/null
+++ b/drivers/gles2/shader_compiler_gles2.cpp
@@ -0,0 +1,891 @@
+/*************************************************************************/
+/* shader_compiler_gles3.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 "shader_compiler_gles2.h"
+
+#include "os/os.h"
+#include "string_buffer.h"
+#include "string_builder.h"
+
+#define SL ShaderLanguage
+
+static String _mktab(int p_level) {
+
+ String tb;
+ for (int i = 0; i < p_level; i++) {
+ tb += "\t";
+ }
+
+ return tb;
+}
+
+static String _typestr(SL::DataType p_type) {
+
+ return ShaderLanguage::get_datatype_name(p_type);
+}
+
+static String _prestr(SL::DataPrecision p_pres) {
+
+ switch (p_pres) {
+ case SL::PRECISION_LOWP: return "lowp ";
+ case SL::PRECISION_MEDIUMP: return "mediump ";
+ case SL::PRECISION_HIGHP: return "highp ";
+ case SL::PRECISION_DEFAULT: return "";
+ }
+ return "";
+}
+
+static String _qualstr(SL::ArgumentQualifier p_qual) {
+
+ switch (p_qual) {
+ case SL::ARGUMENT_QUALIFIER_IN: return "in ";
+ case SL::ARGUMENT_QUALIFIER_OUT: return "out ";
+ case SL::ARGUMENT_QUALIFIER_INOUT: return "inout ";
+ }
+ return "";
+}
+
+static String _opstr(SL::Operator p_op) {
+
+ return SL::get_operator_text(p_op);
+}
+
+static String _mkid(const String &p_id) {
+
+ StringBuffer<> id;
+ id += "m_";
+ id += p_id;
+
+ return id.as_string();
+}
+
+static String f2sp0(float p_float) {
+
+ if (int(p_float) == p_float)
+ return itos(p_float) + ".0";
+ else
+ return rtoss(p_float);
+}
+
+static String get_constant_text(SL::DataType p_type, const Vector<SL::ConstantNode::Value> &p_values) {
+
+ switch (p_type) {
+ case SL::TYPE_BOOL: return p_values[0].boolean ? "true" : "false";
+ case SL::TYPE_BVEC2:
+ case SL::TYPE_BVEC3:
+ case SL::TYPE_BVEC4: {
+
+ StringBuffer<> text;
+
+ text += "bvec";
+ text += itos(p_type - SL::TYPE_BOOL + 1);
+ text += "(";
+
+ for (int i = 0; i < p_values.size(); i++) {
+ if (i > 0)
+ text += ",";
+
+ text += p_values[i].boolean ? "true" : "false";
+ }
+ text += ")";
+ return text.as_string();
+ }
+
+ // GLSL ES 2 doesn't support uints, so we just use signed ints instead...
+ case SL::TYPE_UINT: return itos(p_values[0].uint);
+ case SL::TYPE_UVEC2:
+ case SL::TYPE_UVEC3:
+ case SL::TYPE_UVEC4: {
+
+ StringBuffer<> text;
+
+ text += "ivec";
+ text += itos(p_type - SL::TYPE_UINT + 1);
+ text += "(";
+
+ for (int i = 0; i < p_values.size(); i++) {
+ if (i > 0)
+ text += ",";
+
+ text += itos(p_values[i].uint);
+ }
+ text += ")";
+ return text.as_string();
+
+ } break;
+
+ case SL::TYPE_INT: return itos(p_values[0].sint);
+ case SL::TYPE_IVEC2:
+ case SL::TYPE_IVEC3:
+ case SL::TYPE_IVEC4: {
+
+ StringBuffer<> text;
+
+ text += "ivec";
+ text += itos(p_type - SL::TYPE_INT + 1);
+ text += "(";
+
+ for (int i = 0; i < p_values.size(); i++) {
+ if (i > 0)
+ text += ",";
+
+ text += itos(p_values[i].sint);
+ }
+ text += ")";
+ return text.as_string();
+
+ } break;
+ case SL::TYPE_FLOAT: return f2sp0(p_values[0].real) + "f";
+ case SL::TYPE_VEC2:
+ case SL::TYPE_VEC3:
+ case SL::TYPE_VEC4: {
+
+ StringBuffer<> text;
+
+ text += "vec";
+ text += itos(p_type - SL::TYPE_FLOAT + 1);
+ text += "(";
+
+ for (int i = 0; i < p_values.size(); i++) {
+ if (i > 0)
+ text += ",";
+
+ text += f2sp0(p_values[i].real);
+ }
+ text += ")";
+ return text.as_string();
+
+ } break;
+ case SL::TYPE_MAT2:
+ case SL::TYPE_MAT3:
+ case SL::TYPE_MAT4: {
+
+ StringBuffer<> text;
+
+ text += "mat";
+ text += itos(p_type - SL::TYPE_MAT2 + 2);
+ text += "(";
+
+ for (int i = 0; i < p_values.size(); i++) {
+ if (i > 0)
+ text += ",";
+
+ text += f2sp0(p_values[i].real);
+ }
+ text += ")";
+ return text.as_string();
+
+ } break;
+ default: ERR_FAIL_V(String());
+ }
+}
+
+void ShaderCompilerGLES2::_dump_function_deps(SL::ShaderNode *p_node, const StringName &p_for_func, const Map<StringName, String> &p_func_code, StringBuilder &r_to_add, Set<StringName> &r_added) {
+ int fidx = -1;
+
+ for (int i = 0; i < p_node->functions.size(); i++) {
+ if (p_node->functions[i].name == p_for_func) {
+ fidx = i;
+ break;
+ }
+ }
+
+ ERR_FAIL_COND(fidx == -1);
+
+ for (Set<StringName>::Element *E = p_node->functions[fidx].uses_function.front(); E; E = E->next()) {
+
+ if (r_added.has(E->get())) {
+ continue;
+ }
+
+ _dump_function_deps(p_node, E->get(), p_func_code, r_to_add, r_added);
+
+ SL::FunctionNode *fnode = NULL;
+
+ for (int i = 0; i < p_node->functions.size(); i++) {
+ if (p_node->functions[i].name == E->get()) {
+ fnode = p_node->functions[i].function;
+ break;
+ }
+ }
+
+ ERR_FAIL_COND(!fnode);
+
+ r_to_add += "\n";
+
+ StringBuffer<128> header;
+
+ header += _typestr(fnode->return_type);
+ header += " ";
+ header += _mkid(fnode->name);
+ header += "(";
+
+ for (int i = 0; i < fnode->arguments.size(); i++) {
+ if (i > 0)
+ header += ", ";
+
+ header += _qualstr(fnode->arguments[i].qualifier);
+ header += _prestr(fnode->arguments[i].precision);
+ header += _typestr(fnode->arguments[i].type);
+ header += " ";
+ header += _mkid(fnode->arguments[i].name);
+ }
+
+ header += ")\n";
+ r_to_add += header.as_string();
+ r_to_add += p_func_code[E->get()];
+
+ r_added.insert(E->get());
+ }
+}
+
+String ShaderCompilerGLES2::_dump_node_code(SL::Node *p_node, int p_level, GeneratedCode &r_gen_code, IdentifierActions &p_actions, const DefaultIdentifierActions &p_default_actions, bool p_assigning) {
+
+ StringBuilder code;
+
+ switch (p_node->type) {
+
+ case SL::Node::TYPE_SHADER: {
+
+ SL::ShaderNode *snode = (SL::ShaderNode *)p_node;
+
+ for (int i = 0; i < snode->render_modes.size(); i++) {
+
+ if (p_default_actions.render_mode_defines.has(snode->render_modes[i]) && !used_rmode_defines.has(snode->render_modes[i])) {
+
+ r_gen_code.custom_defines.push_back(p_default_actions.render_mode_defines[snode->render_modes[i]].utf8());
+ used_rmode_defines.insert(snode->render_modes[i]);
+ }
+
+ if (p_actions.render_mode_flags.has(snode->render_modes[i])) {
+ *p_actions.render_mode_flags[snode->render_modes[i]] = true;
+ }
+
+ if (p_actions.render_mode_values.has(snode->render_modes[i])) {
+ Pair<int *, int> &p = p_actions.render_mode_values[snode->render_modes[i]];
+ *p.first = p.second;
+ }
+ }
+
+ int max_texture_uniforms = 0;
+ int max_uniforms = 0;
+
+ for (Map<StringName, SL::ShaderNode::Uniform>::Element *E = snode->uniforms.front(); E; E = E->next()) {
+ if (SL::is_sampler_type(E->get().type))
+ max_texture_uniforms++;
+ else
+ max_uniforms++;
+ }
+
+ r_gen_code.texture_uniforms.resize(max_texture_uniforms);
+ r_gen_code.texture_hints.resize(max_texture_uniforms);
+
+ r_gen_code.uniforms.resize(max_uniforms + max_texture_uniforms);
+
+ StringBuilder vertex_global;
+ StringBuilder fragment_global;
+
+ // uniforms
+
+ for (Map<StringName, SL::ShaderNode::Uniform>::Element *E = snode->uniforms.front(); E; E = E->next()) {
+ StringBuffer<> uniform_code;
+
+ uniform_code += "uniform ";
+
+ uniform_code += _prestr(E->get().precission);
+ uniform_code += _typestr(E->get().type);
+ uniform_code += " ";
+ uniform_code += _mkid(E->key());
+ uniform_code += ";\n";
+
+ if (SL::is_sampler_type(E->get().type)) {
+ r_gen_code.texture_uniforms[E->get().texture_order] = _mkid(E->key());
+ r_gen_code.texture_hints[E->get().texture_order] = E->get().hint;
+ } else {
+ r_gen_code.uniforms[E->get().order] = E->key();
+ }
+
+ vertex_global += uniform_code.as_string();
+ fragment_global += uniform_code.as_string();
+
+ p_actions.uniforms->insert(E->key(), E->get());
+ }
+
+ // varyings
+
+ for (Map<StringName, SL::ShaderNode::Varying>::Element *E = snode->varyings.front(); E; E = E->next()) {
+
+ StringBuffer<> varying_code;
+
+ varying_code += "varying ";
+ varying_code += _prestr(E->get().precission);
+ varying_code += _typestr(E->get().type);
+ varying_code += " ";
+ varying_code += _mkid(E->key());
+ varying_code += ";\n";
+
+ String final_code = varying_code.as_string();
+
+ vertex_global += final_code;
+ fragment_global += final_code;
+ }
+
+ // functions
+
+ Map<StringName, String> function_code;
+
+ for (int i = 0; i < snode->functions.size(); i++) {
+ SL::FunctionNode *fnode = snode->functions[i].function;
+ function_code[fnode->name] = _dump_node_code(fnode->body, 1, r_gen_code, p_actions, p_default_actions, p_assigning);
+ }
+
+ Set<StringName> added_vertex;
+ Set<StringName> added_fragment;
+
+ for (int i = 0; i < snode->functions.size(); i++) {
+
+ SL::FunctionNode *fnode = snode->functions[i].function;
+
+ current_func_name = fnode->name;
+
+ if (fnode->name == vertex_name) {
+ _dump_function_deps(snode, fnode->name, function_code, vertex_global, added_vertex);
+ r_gen_code.vertex = function_code[vertex_name];
+
+ } else if (fnode->name == fragment_name) {
+ _dump_function_deps(snode, fnode->name, function_code, fragment_global, added_fragment);
+ r_gen_code.fragment = function_code[fragment_name];
+
+ } else if (fnode->name == light_name) {
+ _dump_function_deps(snode, fnode->name, function_code, fragment_global, added_fragment);
+ r_gen_code.light = function_code[light_name];
+ }
+ }
+
+ r_gen_code.vertex_global = vertex_global.as_string();
+ r_gen_code.fragment_global = fragment_global.as_string();
+
+ } break;
+
+ case SL::Node::TYPE_FUNCTION: {
+
+ } break;
+
+ case SL::Node::TYPE_BLOCK: {
+
+ SL::BlockNode *bnode = (SL::BlockNode *)p_node;
+
+ if (!bnode->single_statement) {
+ code += _mktab(p_level - 1);
+ code += "{\n";
+ }
+
+ for (int i = 0; i < bnode->statements.size(); i++) {
+ String statement_code = _dump_node_code(bnode->statements[i], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+
+ if (bnode->statements[i]->type == SL::Node::TYPE_CONTROL_FLOW || bnode->single_statement) {
+ code += statement_code;
+ } else {
+ code += _mktab(p_level);
+ code += statement_code;
+ code += ";\n";
+ }
+ }
+
+ if (!bnode->single_statement) {
+ code += _mktab(p_level - 1);
+ code += "}\n";
+ }
+ } break;
+
+ case SL::Node::TYPE_VARIABLE_DECLARATION: {
+ SL::VariableDeclarationNode *var_dec_node = (SL::VariableDeclarationNode *)p_node;
+
+ StringBuffer<> declaration;
+
+ declaration += _prestr(var_dec_node->precision);
+ declaration += _typestr(var_dec_node->datatype);
+
+ for (int i = 0; i < var_dec_node->declarations.size(); i++) {
+
+ if (i > 0) {
+ declaration += ",";
+ }
+
+ declaration += " ";
+
+ declaration += _mkid(var_dec_node->declarations[i].name);
+
+ if (var_dec_node->declarations[i].initializer) {
+ declaration += " = ";
+ declaration += _dump_node_code(var_dec_node->declarations[i].initializer, p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ }
+ }
+
+ code += declaration.as_string();
+ } break;
+
+ case SL::Node::TYPE_VARIABLE: {
+ SL::VariableNode *var_node = (SL::VariableNode *)p_node;
+
+ if (p_assigning && p_actions.write_flag_pointers.has(var_node->name)) {
+ *p_actions.write_flag_pointers[var_node->name] = true;
+ }
+
+ if (p_default_actions.usage_defines.has(var_node->name) && !used_name_defines.has(var_node->name)) {
+ String define = p_default_actions.usage_defines[var_node->name];
+
+ if (define.begins_with("@")) {
+ define = p_default_actions.usage_defines[define.substr(1, define.length())];
+ }
+
+ r_gen_code.custom_defines.push_back(define.utf8());
+ used_name_defines.insert(var_node->name);
+ }
+
+ if (p_actions.usage_flag_pointers.has(var_node->name) && !used_flag_pointers.has(var_node->name)) {
+ *p_actions.usage_flag_pointers[var_node->name] = true;
+ used_flag_pointers.insert(var_node->name);
+ }
+
+ if (p_default_actions.renames.has(var_node->name)) {
+ code += p_default_actions.renames[var_node->name];
+ } else {
+ code += _mkid(var_node->name);
+ }
+
+ if (var_node->name == time_name) {
+ if (current_func_name == vertex_name) {
+ r_gen_code.uses_vertex_time = true;
+ }
+ if (current_func_name == fragment_name || current_func_name == light_name) {
+ r_gen_code.uses_fragment_time = true;
+ }
+ }
+ } break;
+
+ case SL::Node::TYPE_CONSTANT: {
+ SL::ConstantNode *const_node = (SL::ConstantNode *)p_node;
+
+ return get_constant_text(const_node->datatype, const_node->values);
+ } break;
+
+ case SL::Node::TYPE_OPERATOR: {
+ SL::OperatorNode *op_node = (SL::OperatorNode *)p_node;
+
+ switch (op_node->op) {
+ case SL::OP_ASSIGN:
+ case SL::OP_ASSIGN_ADD:
+ case SL::OP_ASSIGN_SUB:
+ case SL::OP_ASSIGN_MUL:
+ case SL::OP_ASSIGN_DIV:
+ case SL::OP_ASSIGN_SHIFT_LEFT:
+ case SL::OP_ASSIGN_SHIFT_RIGHT:
+ case SL::OP_ASSIGN_MOD:
+ case SL::OP_ASSIGN_BIT_AND:
+ case SL::OP_ASSIGN_BIT_OR:
+ case SL::OP_ASSIGN_BIT_XOR: {
+ code += _dump_node_code(op_node->arguments[0], p_level, r_gen_code, p_actions, p_default_actions, true);
+ code += " ";
+ code += _opstr(op_node->op);
+ code += " ";
+ code += _dump_node_code(op_node->arguments[1], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ } break;
+
+ case SL::OP_BIT_INVERT:
+ case SL::OP_NEGATE:
+ case SL::OP_NOT:
+ case SL::OP_DECREMENT:
+ case SL::OP_INCREMENT: {
+ code += _opstr(op_node->op);
+ code += _dump_node_code(op_node->arguments[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ } break;
+
+ case SL::OP_POST_DECREMENT:
+ case SL::OP_POST_INCREMENT: {
+ code += _dump_node_code(op_node->arguments[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += _opstr(op_node->op);
+ } break;
+
+ case SL::OP_CALL:
+ case SL::OP_CONSTRUCT: {
+ ERR_FAIL_COND_V(op_node->arguments[0]->type != SL::Node::TYPE_VARIABLE, String());
+
+ SL::VariableNode *var_node = (SL::VariableNode *)op_node->arguments[0];
+
+ if (op_node->op == SL::OP_CONSTRUCT) {
+ code += var_node->name;
+ } else {
+
+ if (var_node->name == "texture") {
+ // emit texture call
+
+ if (op_node->arguments[1]->get_datatype() == SL::TYPE_SAMPLER2D) {
+ code += "texture2D";
+ } else if (op_node->arguments[1]->get_datatype() == SL::TYPE_SAMPLERCUBE) {
+ code += "textureCube";
+ }
+
+ } else if (p_default_actions.renames.has(var_node->name)) {
+ code += p_default_actions.renames[var_node->name];
+ } else if (internal_functions.has(var_node->name)) {
+ code += var_node->name;
+ } else {
+ code += _mkid(var_node->name);
+ }
+ }
+
+ code += "(";
+
+ for (int i = 1; i < op_node->arguments.size(); i++) {
+ if (i > 1) {
+ code += ", ";
+ }
+
+ code += _dump_node_code(op_node->arguments[i], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ }
+
+ code += ")";
+
+ } break;
+
+ case SL::OP_INDEX: {
+ code += _dump_node_code(op_node->arguments[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += "[";
+ code += _dump_node_code(op_node->arguments[1], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += "]";
+ } break;
+
+ case SL::OP_SELECT_IF: {
+ code += _dump_node_code(op_node->arguments[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += " ? ";
+ code += _dump_node_code(op_node->arguments[1], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += " : ";
+ code += _dump_node_code(op_node->arguments[2], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ } break;
+
+ default: {
+ code += "(";
+ code += _dump_node_code(op_node->arguments[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += " ";
+ code += _opstr(op_node->op);
+ code += " ";
+ code += _dump_node_code(op_node->arguments[1], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += ")";
+ } break;
+ }
+ } break;
+
+ case SL::Node::TYPE_CONTROL_FLOW: {
+ SL::ControlFlowNode *cf_node = (SL::ControlFlowNode *)p_node;
+
+ if (cf_node->flow_op == SL::FLOW_OP_IF) {
+
+ code += _mktab(p_level);
+ code += "if (";
+ code += _dump_node_code(cf_node->expressions[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += ")\n";
+ code += _dump_node_code(cf_node->blocks[0], p_level + 1, r_gen_code, p_actions, p_default_actions, p_assigning);
+
+ if (cf_node->blocks.size() == 2) {
+ code += _mktab(p_level);
+ code += "else\n";
+ code += _dump_node_code(cf_node->blocks[1], p_level + 1, r_gen_code, p_actions, p_default_actions, p_assigning);
+ }
+ } else if (cf_node->flow_op == SL::FLOW_OP_WHILE) {
+ code += _mktab(p_level);
+ code += "while (";
+ code += _dump_node_code(cf_node->expressions[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += ")\n";
+ code += _dump_node_code(cf_node->blocks[0], p_level + 1, r_gen_code, p_actions, p_default_actions, p_assigning);
+ } else if (cf_node->flow_op == SL::FLOW_OP_FOR) {
+
+ code += _mktab(p_level);
+ code += "for (";
+ code += _dump_node_code(cf_node->blocks[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += "; ";
+ code += _dump_node_code(cf_node->expressions[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += "; ";
+ code += _dump_node_code(cf_node->expressions[1], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += ")\n";
+
+ code += _dump_node_code(cf_node->blocks[1], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+
+ } else if (cf_node->flow_op == SL::FLOW_OP_RETURN) {
+ code += _mktab(p_level);
+ code += "return";
+
+ if (cf_node->expressions.size()) {
+ code += " ";
+ code += _dump_node_code(cf_node->expressions[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ }
+ code += ";\n";
+ } else if (cf_node->flow_op == SL::FLOW_OP_DISCARD) {
+ code += "discard;";
+ } else if (cf_node->flow_op == SL::FLOW_OP_CONTINUE) {
+ code += "continue;";
+ } else if (cf_node->flow_op == SL::FLOW_OP_BREAK) {
+ code += "break;";
+ }
+ } break;
+
+ case SL::Node::TYPE_MEMBER: {
+ SL::MemberNode *member_node = (SL::MemberNode *)p_node;
+ code += _dump_node_code(member_node->owner, p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ code += ".";
+ code += member_node->name;
+ } break;
+ }
+
+ return code.as_string();
+}
+
+Error ShaderCompilerGLES2::compile(VS::ShaderMode p_mode, const String &p_code, IdentifierActions *p_actions, const String &p_path, GeneratedCode &r_gen_code) {
+
+ Error err = parser.compile(p_code, ShaderTypes::get_singleton()->get_functions(p_mode), ShaderTypes::get_singleton()->get_modes(p_mode), ShaderTypes::get_singleton()->get_types());
+
+ if (err != OK) {
+
+ Vector<String> shader = p_code.split("\n");
+ for (int i = 0; i < shader.size(); i++) {
+ print_line(itos(i) + " " + shader[i]);
+ }
+
+ _err_print_error(NULL, p_path.utf8().get_data(), parser.get_error_line(), parser.get_error_text().utf8().get_data(), ERR_HANDLER_SHADER);
+ return err;
+ }
+
+ r_gen_code.custom_defines.clear();
+ r_gen_code.uniforms.clear();
+ r_gen_code.texture_uniforms.clear();
+ r_gen_code.texture_hints.clear();
+ r_gen_code.vertex = String();
+ r_gen_code.vertex_global = String();
+ r_gen_code.fragment = String();
+ r_gen_code.fragment_global = String();
+ r_gen_code.light = String();
+ r_gen_code.uses_fragment_time = false;
+ r_gen_code.uses_vertex_time = false;
+
+ used_name_defines.clear();
+ used_rmode_defines.clear();
+ used_flag_pointers.clear();
+
+ _dump_node_code(parser.get_shader(), 1, r_gen_code, *p_actions, actions[p_mode], false);
+
+ return OK;
+}
+
+ShaderCompilerGLES2::ShaderCompilerGLES2() {
+
+ /** CANVAS ITEM SHADER **/
+
+ actions[VS::SHADER_CANVAS_ITEM].renames["VERTEX"] = "outvec.xy";
+ actions[VS::SHADER_CANVAS_ITEM].renames["UV"] = "uv_interp";
+ actions[VS::SHADER_CANVAS_ITEM].renames["POINT_SIZE"] = "gl_PointSize";
+
+ actions[VS::SHADER_CANVAS_ITEM].renames["WORLD_MATRIX"] = "modelview_matrix";
+ actions[VS::SHADER_CANVAS_ITEM].renames["PROJECTION_MATRIX"] = "projection_matrix";
+ actions[VS::SHADER_CANVAS_ITEM].renames["EXTRA_MATRIX"] == "extra_matrix";
+ actions[VS::SHADER_CANVAS_ITEM].renames["TIME"] = "time";
+ actions[VS::SHADER_CANVAS_ITEM].renames["AT_LIGHT_PASS"] = "at_light_pass";
+ actions[VS::SHADER_CANVAS_ITEM].renames["INSTANCE_CUSTOM"] = "instance_custom";
+
+ actions[VS::SHADER_CANVAS_ITEM].renames["COLOR"] = "color";
+ actions[VS::SHADER_CANVAS_ITEM].renames["NORMAL"] = "normal";
+ actions[VS::SHADER_CANVAS_ITEM].renames["NORMALMAP"] = "normal_map";
+ actions[VS::SHADER_CANVAS_ITEM].renames["NORMALMAP_DEPTH"] = "normal_depth";
+ actions[VS::SHADER_CANVAS_ITEM].renames["UV"] = "uv_interp";
+ actions[VS::SHADER_CANVAS_ITEM].renames["COLOR"] = "color";
+ actions[VS::SHADER_CANVAS_ITEM].renames["TEXTURE"] = "color_texture";
+ actions[VS::SHADER_CANVAS_ITEM].renames["TEXTURE_PIXEL_SIZE"] = "color_texpixel_size";
+ actions[VS::SHADER_CANVAS_ITEM].renames["NORMAL_TEXTURE"] = "normal_texture";
+ actions[VS::SHADER_CANVAS_ITEM].renames["SCREEN_UV"] = "screen_uv";
+ actions[VS::SHADER_CANVAS_ITEM].renames["SCREEN_TEXTURE"] = "screen_texture";
+ actions[VS::SHADER_CANVAS_ITEM].renames["SCREEN_PIXEL_SIZE"] = "screen_pixel_size";
+ actions[VS::SHADER_CANVAS_ITEM].renames["FRAGCOORD"] = "gl_FragCoord";
+ actions[VS::SHADER_CANVAS_ITEM].renames["POINT_COORD"] = "gl_PointCoord";
+
+ actions[VS::SHADER_CANVAS_ITEM].renames["LIGHT_VEC"] = "light_vec";
+ actions[VS::SHADER_CANVAS_ITEM].renames["LIGHT_HEIGHT"] = "light_height";
+ actions[VS::SHADER_CANVAS_ITEM].renames["LIGHT_COLOR"] = "light_color";
+ actions[VS::SHADER_CANVAS_ITEM].renames["LIGHT_UV"] = "light_uv";
+ //actions[VS::SHADER_CANVAS_ITEM].renames["LIGHT_SHADOW_COLOR"]="light_shadow_color";
+ actions[VS::SHADER_CANVAS_ITEM].renames["LIGHT"] = "light";
+ actions[VS::SHADER_CANVAS_ITEM].renames["SHADOW_COLOR"] = "shadow_color";
+
+ actions[VS::SHADER_CANVAS_ITEM].usage_defines["COLOR"] = "#define COLOR_USED\n";
+ actions[VS::SHADER_CANVAS_ITEM].usage_defines["SCREEN_TEXTURE"] = "#define SCREEN_TEXTURE_USED\n";
+ actions[VS::SHADER_CANVAS_ITEM].usage_defines["SCREEN_UV"] = "#define SCREEN_UV_USED\n";
+ actions[VS::SHADER_CANVAS_ITEM].usage_defines["SCREEN_PIXEL_SIZE"] = "@SCREEN_UV";
+ actions[VS::SHADER_CANVAS_ITEM].usage_defines["NORMAL"] = "#define NORMAL_USED\n";
+ actions[VS::SHADER_CANVAS_ITEM].usage_defines["NORMALMAP"] = "#define NORMALMAP_USED\n";
+ actions[VS::SHADER_CANVAS_ITEM].usage_defines["SHADOW_COLOR"] = "#define SHADOW_COLOR_USED\n";
+ actions[VS::SHADER_CANVAS_ITEM].usage_defines["LIGHT"] = "#define USE_LIGHT_SHADER_CODE\n";
+
+ actions[VS::SHADER_CANVAS_ITEM].render_mode_defines["skip_vertex_transform"] = "#define SKIP_TRANSFORM_USED\n";
+
+ /** SPATIAL SHADER **/
+
+ actions[VS::SHADER_SPATIAL].renames["WORLD_MATRIX"] = "world_transform";
+ actions[VS::SHADER_SPATIAL].renames["INV_CAMERA_MATRIX"] = "camera_inverse_matrix";
+ actions[VS::SHADER_SPATIAL].renames["CAMERA_MATRIX"] = "camera_matrix";
+ actions[VS::SHADER_SPATIAL].renames["PROJECTION_MATRIX"] = "projection_matrix";
+ actions[VS::SHADER_SPATIAL].renames["INV_PROJECTION_MATRIX"] = "inv_projection_matrix";
+ actions[VS::SHADER_SPATIAL].renames["MODELVIEW_MATRIX"] = "modelview";
+
+ actions[VS::SHADER_SPATIAL].renames["VERTEX"] = "vertex.xyz";
+ actions[VS::SHADER_SPATIAL].renames["NORMAL"] = "normal";
+ actions[VS::SHADER_SPATIAL].renames["TANGENT"] = "tangent";
+ actions[VS::SHADER_SPATIAL].renames["BINORMAL"] = "binormal";
+ actions[VS::SHADER_SPATIAL].renames["UV"] = "uv_interp";
+ actions[VS::SHADER_SPATIAL].renames["UV2"] = "uv2_interp";
+ actions[VS::SHADER_SPATIAL].renames["COLOR"] = "color_interp";
+ actions[VS::SHADER_SPATIAL].renames["POINT_SIZE"] = "gl_PointSize";
+ //actions[VS::SHADER_SPATIAL].renames["INSTANCE_ID"]=ShaderLanguage::TYPE_INT;
+
+ //builtins
+
+ actions[VS::SHADER_SPATIAL].renames["TIME"] = "time";
+ actions[VS::SHADER_SPATIAL].renames["VIEWPORT_SIZE"] = "viewport_size";
+
+ actions[VS::SHADER_SPATIAL].renames["FRAGCOORD"] = "gl_FragCoord";
+ actions[VS::SHADER_SPATIAL].renames["FRONT_FACING"] = "gl_FrontFacing";
+ actions[VS::SHADER_SPATIAL].renames["NORMALMAP"] = "normalmap";
+ actions[VS::SHADER_SPATIAL].renames["NORMALMAP_DEPTH"] = "normaldepth";
+ actions[VS::SHADER_SPATIAL].renames["ALBEDO"] = "albedo";
+ actions[VS::SHADER_SPATIAL].renames["ALPHA"] = "alpha";
+ actions[VS::SHADER_SPATIAL].renames["METALLIC"] = "metallic";
+ actions[VS::SHADER_SPATIAL].renames["SPECULAR"] = "specular";
+ actions[VS::SHADER_SPATIAL].renames["ROUGHNESS"] = "roughness";
+ actions[VS::SHADER_SPATIAL].renames["RIM"] = "rim";
+ actions[VS::SHADER_SPATIAL].renames["RIM_TINT"] = "rim_tint";
+ actions[VS::SHADER_SPATIAL].renames["CLEARCOAT"] = "clearcoat";
+ actions[VS::SHADER_SPATIAL].renames["CLEARCOAT_GLOSS"] = "clearcoat_gloss";
+ actions[VS::SHADER_SPATIAL].renames["ANISOTROPY"] = "anisotropy";
+ actions[VS::SHADER_SPATIAL].renames["ANISOTROPY_FLOW"] = "anisotropy_flow";
+ //actions[VS::SHADER_SPATIAL].renames["SSS_SPREAD"] = "sss_spread";
+ actions[VS::SHADER_SPATIAL].renames["SSS_STRENGTH"] = "sss_strength";
+ actions[VS::SHADER_SPATIAL].renames["TRANSMISSION"] = "transmission";
+ actions[VS::SHADER_SPATIAL].renames["AO"] = "ao";
+ actions[VS::SHADER_SPATIAL].renames["AO_LIGHT_AFFECT"] = "ao_light_affect";
+ actions[VS::SHADER_SPATIAL].renames["EMISSION"] = "emission";
+ //actions[VS::SHADER_SPATIAL].renames["SCREEN_UV"]=ShaderLanguage::TYPE_VEC2;
+ actions[VS::SHADER_SPATIAL].renames["POINT_COORD"] = "gl_PointCoord";
+ actions[VS::SHADER_SPATIAL].renames["INSTANCE_CUSTOM"] = "instance_custom";
+ actions[VS::SHADER_SPATIAL].renames["SCREEN_UV"] = "screen_uv";
+ actions[VS::SHADER_SPATIAL].renames["SCREEN_TEXTURE"] = "screen_texture";
+ actions[VS::SHADER_SPATIAL].renames["DEPTH_TEXTURE"] = "depth_buffer";
+ actions[VS::SHADER_SPATIAL].renames["SIDE"] = "side";
+ actions[VS::SHADER_SPATIAL].renames["ALPHA_SCISSOR"] = "alpha_scissor";
+
+ //for light
+ actions[VS::SHADER_SPATIAL].renames["VIEW"] = "view";
+ actions[VS::SHADER_SPATIAL].renames["LIGHT_COLOR"] = "light_color";
+ actions[VS::SHADER_SPATIAL].renames["ATTENUATION"] = "attenuation";
+ actions[VS::SHADER_SPATIAL].renames["DIFFUSE_LIGHT"] = "diffuse_light";
+ actions[VS::SHADER_SPATIAL].renames["SPECULAR_LIGHT"] = "specular_light";
+
+ actions[VS::SHADER_SPATIAL].usage_defines["TANGENT"] = "#define ENABLE_TANGENT_INTERP\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["BINORMAL"] = "@TANGENT";
+ actions[VS::SHADER_SPATIAL].usage_defines["RIM"] = "#define LIGHT_USE_RIM\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["RIM_TINT"] = "@RIM";
+ actions[VS::SHADER_SPATIAL].usage_defines["CLEARCOAT"] = "#define LIGHT_USE_CLEARCOAT\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["CLEARCOAT_GLOSS"] = "@CLEARCOAT";
+ actions[VS::SHADER_SPATIAL].usage_defines["ANISOTROPY"] = "#define LIGHT_USE_ANISOTROPY\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["ANISOTROPY_FLOW"] = "@ANISOTROPY";
+ actions[VS::SHADER_SPATIAL].usage_defines["AO"] = "#define ENABLE_AO\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["AO_LIGHT_AFFECT"] = "#define ENABLE_AO\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["UV"] = "#define ENABLE_UV_INTERP\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["UV2"] = "#define ENABLE_UV2_INTERP\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["NORMALMAP"] = "#define ENABLE_NORMALMAP\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["NORMALMAP_DEPTH"] = "@NORMALMAP";
+ actions[VS::SHADER_SPATIAL].usage_defines["COLOR"] = "#define ENABLE_COLOR_INTERP\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["INSTANCE_CUSTOM"] = "#define ENABLE_INSTANCE_CUSTOM\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["ALPHA_SCISSOR"] = "#define ALPHA_SCISSOR_USED\n";
+
+ actions[VS::SHADER_SPATIAL].usage_defines["SSS_STRENGTH"] = "#define ENABLE_SSS\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["TRANSMISSION"] = "#define TRANSMISSION_USED\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["SCREEN_TEXTURE"] = "#define SCREEN_TEXTURE_USED\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["SCREEN_UV"] = "#define SCREEN_UV_USED\n";
+
+ actions[VS::SHADER_SPATIAL].usage_defines["DIFFUSE_LIGHT"] = "#define USE_LIGHT_SHADER_CODE\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["SPECULAR_LIGHT"] = "#define USE_LIGHT_SHADER_CODE\n";
+
+ actions[VS::SHADER_SPATIAL].renames["SSS_STRENGTH"] = "sss_strength";
+
+ actions[VS::SHADER_SPATIAL].render_mode_defines["skip_vertex_transform"] = "#define SKIP_TRANSFORM_USED\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["world_vertex_coords"] = "#define VERTEX_WORLD_COORDS_USED\n";
+
+ actions[VS::SHADER_SPATIAL].render_mode_defines["diffuse_burley"] = "#define DIFFUSE_BURLEY\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["diffuse_oren_nayar"] = "#define DIFFUSE_OREN_NAYAR\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["diffuse_lambert_wrap"] = "#define DIFFUSE_LAMBERT_WRAP\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["diffuse_toon"] = "#define DIFFUSE_TOON\n";
+
+ actions[VS::SHADER_SPATIAL].render_mode_defines["specular_schlick_ggx"] = "#define SPECULAR_SCHLICK_GGX\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["specular_blinn"] = "#define SPECULAR_BLINN\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["specular_phong"] = "#define SPECULAR_PHONG\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["specular_toon"] = "#define SPECULAR_TOON\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["specular_disabled"] = "#define SPECULAR_DISABLED\n";
+
+ /* PARTICLES SHADER */
+
+ actions[VS::SHADER_PARTICLES].renames["COLOR"] = "out_color";
+ actions[VS::SHADER_PARTICLES].renames["VELOCITY"] = "out_velocity_active.xyz";
+ actions[VS::SHADER_PARTICLES].renames["MASS"] = "mass";
+ actions[VS::SHADER_PARTICLES].renames["ACTIVE"] = "active";
+ actions[VS::SHADER_PARTICLES].renames["RESTART"] = "restart";
+ actions[VS::SHADER_PARTICLES].renames["CUSTOM"] = "out_custom";
+ actions[VS::SHADER_PARTICLES].renames["TRANSFORM"] = "xform";
+ actions[VS::SHADER_PARTICLES].renames["TIME"] = "time";
+ actions[VS::SHADER_PARTICLES].renames["LIFETIME"] = "lifetime";
+ actions[VS::SHADER_PARTICLES].renames["DELTA"] = "local_delta";
+ actions[VS::SHADER_PARTICLES].renames["NUMBER"] = "particle_number";
+ actions[VS::SHADER_PARTICLES].renames["INDEX"] = "index";
+ actions[VS::SHADER_PARTICLES].renames["GRAVITY"] = "current_gravity";
+ actions[VS::SHADER_PARTICLES].renames["EMISSION_TRANSFORM"] = "emission_transform";
+ actions[VS::SHADER_PARTICLES].renames["RANDOM_SEED"] = "random_seed";
+
+ actions[VS::SHADER_SPATIAL].render_mode_defines["disable_force"] = "#define DISABLE_FORCE\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["disable_velocity"] = "#define DISABLE_VELOCITY\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["keep_data"] = "#define ENABLE_KEEP_DATA\n";
+
+ vertex_name = "vertex";
+ fragment_name = "fragment";
+ light_name = "light";
+ time_name = "TIME";
+
+ List<String> func_list;
+
+ ShaderLanguage::get_builtin_funcs(&func_list);
+
+ for (List<String>::Element *E = func_list.front(); E; E = E->next()) {
+ internal_functions.insert(E->get());
+ }
+}
diff --git a/drivers/gles2/shader_compiler_gles2.h b/drivers/gles2/shader_compiler_gles2.h
new file mode 100644
index 0000000000..b9cbc216d7
--- /dev/null
+++ b/drivers/gles2/shader_compiler_gles2.h
@@ -0,0 +1,101 @@
+/*************************************************************************/
+/* shader_compiler_gles2.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 SHADERCOMPILERGLES2_H
+#define SHADERCOMPILERGLES2_H
+
+#include "pair.h"
+#include "servers/visual/shader_language.h"
+#include "servers/visual/shader_types.h"
+#include "servers/visual_server.h"
+
+#include "string_builder.h"
+
+class ShaderCompilerGLES2 {
+public:
+ struct IdentifierActions {
+
+ Map<StringName, Pair<int *, int> > render_mode_values;
+ Map<StringName, bool *> render_mode_flags;
+ Map<StringName, bool *> usage_flag_pointers;
+ Map<StringName, bool *> write_flag_pointers;
+
+ Map<StringName, ShaderLanguage::ShaderNode::Uniform> *uniforms;
+ };
+
+ struct GeneratedCode {
+
+ Vector<CharString> custom_defines;
+ Vector<StringName> uniforms;
+ Vector<StringName> texture_uniforms;
+ Vector<ShaderLanguage::ShaderNode::Uniform::Hint> texture_hints;
+
+ String vertex_global;
+ String vertex;
+ String fragment_global;
+ String fragment;
+ String light;
+
+ bool uses_fragment_time;
+ bool uses_vertex_time;
+ };
+
+private:
+ ShaderLanguage parser;
+
+ struct DefaultIdentifierActions {
+
+ Map<StringName, String> renames;
+ Map<StringName, String> render_mode_defines;
+ Map<StringName, String> usage_defines;
+ };
+
+ void _dump_function_deps(ShaderLanguage::ShaderNode *p_node, const StringName &p_for_func, const Map<StringName, String> &p_func_code, StringBuilder &r_to_add, Set<StringName> &r_added);
+ String _dump_node_code(ShaderLanguage::Node *p_node, int p_level, GeneratedCode &r_gen_code, IdentifierActions &p_actions, const DefaultIdentifierActions &p_default_actions, bool p_assigning);
+
+ StringName current_func_name;
+ StringName vertex_name;
+ StringName fragment_name;
+ StringName light_name;
+ StringName time_name;
+
+ Set<StringName> used_name_defines;
+ Set<StringName> used_flag_pointers;
+ Set<StringName> used_rmode_defines;
+ Set<StringName> internal_functions;
+
+ DefaultIdentifierActions actions[VS::SHADER_MAX];
+
+public:
+ Error compile(VS::ShaderMode p_mode, const String &p_code, IdentifierActions *p_actions, const String &p_path, GeneratedCode &r_gen_code);
+
+ ShaderCompilerGLES2();
+};
+
+#endif // SHADERCOMPILERGLES3_H
diff --git a/drivers/gles2/shader_gles2.cpp b/drivers/gles2/shader_gles2.cpp
new file mode 100644
index 0000000000..7564497d47
--- /dev/null
+++ b/drivers/gles2/shader_gles2.cpp
@@ -0,0 +1,689 @@
+/*************************************************************************/
+/* shader_gles2.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 "shader_gles2.h"
+
+#include "memory.h"
+#include "print_string.h"
+#include "string_builder.h"
+
+//#define DEBUG_OPENGL
+
+// #include "shaders/copy.glsl.gen.h"
+
+#ifdef DEBUG_OPENGL
+
+#define DEBUG_TEST_ERROR(m_section) \
+ { \
+ uint32_t err = glGetError(); \
+ if (err) { \
+ print_line("OpenGL Error #" + itos(err) + " at: " + m_section); \
+ } \
+ }
+#else
+
+#define DEBUG_TEST_ERROR(m_section)
+
+#endif
+
+ShaderGLES2 *ShaderGLES2::active = NULL;
+
+//#define DEBUG_SHADER
+
+#ifdef DEBUG_SHADER
+
+#define DEBUG_PRINT(m_text) print_line(m_text);
+
+#else
+
+#define DEBUG_PRINT(m_text)
+
+#endif
+
+void ShaderGLES2::bind_uniforms() {
+ if (!uniforms_dirty)
+ return;
+
+ // regular uniforms
+
+ const Map<uint32_t, Variant>::Element *E = uniform_defaults.front();
+
+ while (E) {
+ int idx = E->key();
+ int location = version->uniform_location[idx];
+
+ if (location < 0) {
+ E = E->next();
+ continue;
+ }
+
+ const Variant &v = E->value();
+ _set_uniform_variant(location, v);
+ E = E->next();
+ }
+
+ // camera uniforms
+
+ const Map<uint32_t, CameraMatrix>::Element *C = uniform_cameras.front();
+
+ while (C) {
+ int idx = E->key();
+ int location = version->uniform_location[idx];
+
+ if (location < 0) {
+ C = C->next();
+ continue;
+ }
+
+ glUniformMatrix4fv(location, 1, GL_FALSE, &(C->get().matrix[0][0]));
+ C = C->next();
+ }
+
+ uniforms_dirty = false;
+}
+
+GLint ShaderGLES2::get_uniform_location(int p_index) const {
+
+ ERR_FAIL_COND_V(!version, -1);
+
+ return version->uniform_location[p_index];
+}
+
+bool ShaderGLES2::bind() {
+
+ if (active != this || !version || new_conditional_version.key != conditional_version.key) {
+ conditional_version = new_conditional_version;
+ version = get_current_version();
+ } else {
+ return false;
+ }
+
+ ERR_FAIL_COND_V(!version, false);
+
+ glUseProgram(version->id);
+
+ DEBUG_TEST_ERROR("use program");
+
+ active = this;
+ uniforms_dirty = true;
+
+ return true;
+}
+
+void ShaderGLES2::unbind() {
+ version = NULL;
+ glUseProgram(0);
+ uniforms_dirty = true;
+ active = NULL;
+}
+
+static String _fix_error_code_line(const String &p_error, int p_code_start, int p_offset) {
+
+ int last_find_pos = -1;
+ // NVIDIA
+ String error = p_error;
+ while ((last_find_pos = p_error.find("(", last_find_pos + 1)) != -1) {
+
+ int end_pos = last_find_pos + 1;
+
+ while (true) {
+
+ if (p_error[end_pos] >= '0' && p_error[end_pos] <= '9') {
+
+ end_pos++;
+ continue;
+ } else if (p_error[end_pos] == ')') {
+ break;
+ } else {
+
+ end_pos = -1;
+ break;
+ }
+ }
+
+ if (end_pos == -1)
+ continue;
+
+ String numstr = error.substr(last_find_pos + 1, (end_pos - last_find_pos) - 1);
+ String begin = error.substr(0, last_find_pos + 1);
+ String end = error.substr(end_pos, error.length());
+ int num = numstr.to_int() + p_code_start - p_offset;
+ error = begin + itos(num) + end;
+ }
+
+ // ATI
+ last_find_pos = -1;
+ while ((last_find_pos = p_error.find("ERROR: ", last_find_pos + 1)) != -1) {
+
+ last_find_pos += 6;
+ int end_pos = last_find_pos + 1;
+
+ while (true) {
+
+ if (p_error[end_pos] >= '0' && p_error[end_pos] <= '9') {
+
+ end_pos++;
+ continue;
+ } else if (p_error[end_pos] == ':') {
+ break;
+ } else {
+
+ end_pos = -1;
+ break;
+ }
+ }
+ continue;
+ if (end_pos == -1)
+ continue;
+
+ String numstr = error.substr(last_find_pos + 1, (end_pos - last_find_pos) - 1);
+ print_line("numstr: " + numstr);
+ String begin = error.substr(0, last_find_pos + 1);
+ String end = error.substr(end_pos, error.length());
+ int num = numstr.to_int() + p_code_start - p_offset;
+ error = begin + itos(num) + end;
+ }
+ return error;
+}
+
+ShaderGLES2::Version *ShaderGLES2::get_current_version() {
+
+ Version *_v = version_map.getptr(conditional_version);
+
+ if (_v) {
+ if (conditional_version.code_version != 0) {
+ CustomCode *cc = custom_code_map.getptr(conditional_version.code_version);
+ ERR_FAIL_COND_V(!cc, _v);
+ if (cc->version == _v->code_version)
+ return _v;
+ } else {
+ return _v;
+ }
+ }
+
+ if (!_v)
+ version_map[conditional_version];
+
+ Version &v = version_map[conditional_version];
+
+ if (!_v) {
+ v.uniform_location = memnew_arr(GLint, uniform_count);
+ } else {
+ if (v.ok) {
+ glDeleteShader(v.vert_id);
+ glDeleteShader(v.frag_id);
+ glDeleteProgram(v.id);
+ v.id = 0;
+ }
+ }
+
+ v.ok = false;
+
+ Vector<const char *> strings;
+
+#ifdef GLES_OVER_GL
+ strings.push_back("#version 120\n");
+ strings.push_back("#define USE_GLES_OVER_GL\n");
+#else
+ strings.push_back("#version 100\n");
+#endif
+
+ int define_line_ofs = 1;
+
+ for (int j = 0; j < conditional_count; j++) {
+ bool enable = (conditional_version.version & (1 << j)) > 0;
+
+ if (enable) {
+ strings.push_back(conditional_defines[j]);
+ define_line_ofs++;
+ DEBUG_PRINT(conditional_defines[j]);
+ }
+ }
+
+ // keep them around during the functino
+ CharString code_string;
+ CharString code_string2;
+ CharString code_globals;
+
+ CustomCode *cc = NULL;
+
+ if (conditional_version.code_version > 0) {
+ cc = custom_code_map.getptr(conditional_version.code_version);
+
+ ERR_FAIL_COND_V(!cc, NULL);
+ v.code_version = cc->version;
+ define_line_ofs += 2;
+ }
+
+ // program
+
+ v.id = glCreateProgram();
+ ERR_FAIL_COND_V(v.id == 0, NULL);
+
+ if (cc) {
+ for (int i = 0; i < cc->custom_defines.size(); i++) {
+ strings.push_back(cc->custom_defines[i]);
+ DEBUG_PRINT("CD #" + itos(i) + ": " + String(cc->custom_defines[i]));
+ }
+ }
+
+ // vertex shader
+
+ int string_base_size = strings.size();
+
+ strings.push_back(vertex_code0.get_data());
+
+ if (cc) {
+ code_globals = cc->vertex_globals.ascii();
+ strings.push_back(code_globals.get_data());
+ }
+
+ strings.push_back(vertex_code1.get_data());
+
+ if (cc) {
+ code_string = cc->vertex.ascii();
+ strings.push_back(code_string.get_data());
+ }
+
+ strings.push_back(vertex_code2.get_data());
+
+#ifdef DEBUG_SHADER
+
+ DEBUG_PRINT("\nVertex Code:\n\n" + String(code_string.get_data()));
+
+#endif
+
+ v.vert_id = glCreateShader(GL_VERTEX_SHADER);
+ glShaderSource(v.vert_id, strings.size(), &strings[0], NULL);
+ glCompileShader(v.vert_id);
+
+ GLint status;
+
+ glGetShaderiv(v.vert_id, GL_COMPILE_STATUS, &status);
+ if (status == GL_FALSE) {
+ GLsizei iloglen;
+ glGetShaderiv(v.vert_id, GL_INFO_LOG_LENGTH, &iloglen);
+
+ if (iloglen < 0) {
+ glDeleteShader(v.vert_id);
+ glDeleteProgram(v.id);
+ v.id = 0;
+
+ ERR_PRINT("No OpenGL vertex shader compiler log. What the frick?");
+ } else {
+ if (iloglen == 0) {
+ iloglen = 4096; // buggy driver (Adreno 220+)
+ }
+
+ char *ilogmem = (char *)Memory::alloc_static(iloglen + 1);
+ ilogmem[iloglen] = '\0';
+ glGetShaderInfoLog(v.vert_id, iloglen, &iloglen, ilogmem);
+
+ String err_string = get_shader_name() + ": Vertex shader compilation failed:\n";
+
+ err_string += ilogmem;
+ err_string = _fix_error_code_line(err_string, vertex_code_start, define_line_ofs);
+
+ ERR_PRINTS(err_string);
+
+ Memory::free_static(ilogmem);
+ glDeleteShader(v.vert_id);
+ glDeleteProgram(v.id);
+ v.id = 0;
+ }
+
+ ERR_FAIL_V(NULL);
+ }
+
+ strings.resize(string_base_size);
+
+ // fragment shader
+
+ strings.push_back(fragment_code0.get_data());
+
+ if (cc) {
+ code_globals = cc->fragment_globals.ascii();
+ strings.push_back(code_globals.get_data());
+ }
+
+ strings.push_back(fragment_code1.get_data());
+
+ if (cc) {
+ code_string = cc->fragment.ascii();
+ strings.push_back(code_string.get_data());
+ }
+
+ strings.push_back(fragment_code2.get_data());
+
+ if (cc) {
+ code_string2 = cc->light.ascii();
+ strings.push_back(code_string2.get_data());
+ }
+
+ strings.push_back(fragment_code3.get_data());
+
+#ifdef DEBUG_SHADER
+ DEBUG_PRINT("\nFragment Code:\n\n" + String(code_string.get_data()));
+#endif
+
+ v.frag_id = glCreateShader(GL_FRAGMENT_SHADER);
+ glShaderSource(v.frag_id, strings.size(), &strings[0], NULL);
+ glCompileShader(v.frag_id);
+
+ glGetShaderiv(v.frag_id, GL_COMPILE_STATUS, &status);
+ if (status == GL_FALSE) {
+ GLsizei iloglen;
+ glGetShaderiv(v.frag_id, GL_INFO_LOG_LENGTH, &iloglen);
+
+ if (iloglen < 0) {
+ glDeleteShader(v.frag_id);
+ glDeleteShader(v.vert_id);
+ glDeleteProgram(v.id);
+ v.id = 0;
+
+ ERR_PRINT("No OpenGL fragment shader compiler log. What the frick?");
+ } else {
+ if (iloglen == 0) {
+ iloglen = 4096; // buggy driver (Adreno 220+)
+ }
+
+ char *ilogmem = (char *)Memory::alloc_static(iloglen + 1);
+ ilogmem[iloglen] = '\0';
+ glGetShaderInfoLog(v.frag_id, iloglen, &iloglen, ilogmem);
+
+ String err_string = get_shader_name() + ": Fragment shader compilation failed:\n";
+
+ err_string += ilogmem;
+ err_string = _fix_error_code_line(err_string, fragment_code_start, define_line_ofs);
+
+ ERR_PRINTS(err_string);
+
+ Memory::free_static(ilogmem);
+ glDeleteShader(v.frag_id);
+ glDeleteShader(v.vert_id);
+ glDeleteProgram(v.id);
+ v.id = 0;
+ }
+
+ ERR_FAIL_V(NULL);
+ }
+
+ glAttachShader(v.id, v.frag_id);
+ glAttachShader(v.id, v.vert_id);
+
+ // bind the attribute locations. This has to be done before linking so that the
+ // linker doesn't assign some random indices
+
+ for (int i = 0; i < attribute_pair_count; i++) {
+ glBindAttribLocation(v.id, attribute_pairs[i].index, attribute_pairs[i].name);
+ }
+
+ glLinkProgram(v.id);
+
+ glGetProgramiv(v.id, GL_LINK_STATUS, &status);
+ if (status == GL_FALSE) {
+ GLsizei iloglen;
+ glGetProgramiv(v.id, GL_INFO_LOG_LENGTH, &iloglen);
+
+ if (iloglen < 0) {
+ glDeleteShader(v.frag_id);
+ glDeleteShader(v.vert_id);
+ glDeleteProgram(v.id);
+ v.id = 0;
+
+ ERR_PRINT("No OpenGL program link log. What the frick?");
+ ERR_FAIL_V(NULL);
+ }
+
+ if (iloglen == 0) {
+ iloglen = 4096; // buggy driver (Adreno 220+)
+ }
+
+ char *ilogmem = (char *)Memory::alloc_static(iloglen + 1);
+ ilogmem[iloglen] = '\0';
+ glGetProgramInfoLog(v.id, iloglen, &iloglen, ilogmem);
+
+ String err_string = get_shader_name() + ": Program linking failed:\n";
+
+ err_string += ilogmem;
+ err_string = _fix_error_code_line(err_string, fragment_code_start, define_line_ofs);
+
+ ERR_PRINTS(err_string);
+
+ Memory::free_static(ilogmem);
+ glDeleteShader(v.frag_id);
+ glDeleteShader(v.vert_id);
+ glDeleteProgram(v.id);
+ v.id = 0;
+
+ ERR_FAIL_V(NULL);
+ }
+
+ // get uniform locations
+
+ glUseProgram(v.id);
+
+ for (int i = 0; i < uniform_count; i++) {
+ v.uniform_location[i] = glGetUniformLocation(v.id, uniform_names[i]);
+ }
+
+ for (int i = 0; i < texunit_pair_count; i++) {
+ GLint loc = glGetUniformLocation(v.id, texunit_pairs[i].name);
+ if (loc >= 0)
+ glUniform1i(loc, texunit_pairs[i].index);
+ }
+
+ if (cc) {
+ v.custom_uniform_locations.resize(cc->custom_uniforms.size());
+ for (int i = 0; i < cc->custom_uniforms.size(); i++) {
+ v.custom_uniform_locations[i] = glGetUniformLocation(v.id, String(cc->custom_uniforms[i]).ascii().get_data());
+ }
+ }
+
+ glUseProgram(0);
+ v.ok = true;
+
+ return &v;
+}
+
+GLint ShaderGLES2::get_uniform_location(const String &p_name) const {
+
+ ERR_FAIL_COND_V(!version, -1);
+ return glGetUniformLocation(version->id, p_name.ascii().get_data());
+}
+
+void ShaderGLES2::setup(
+ const char **p_conditional_defines,
+ int p_conditional_count,
+ const char **p_uniform_names,
+ int p_uniform_count,
+ const AttributePair *p_attribute_pairs,
+ int p_attribute_count,
+ const TexUnitPair *p_texunit_pairs,
+ int p_texunit_pair_count,
+ const char *p_vertex_code,
+ const char *p_fragment_code,
+ int p_vertex_code_start,
+ int p_fragment_code_start) {
+
+ ERR_FAIL_COND(version);
+
+ conditional_version.key = 0;
+ new_conditional_version.key = 0;
+ uniform_count = p_uniform_count;
+ conditional_count = p_conditional_count;
+ conditional_defines = p_conditional_defines;
+ uniform_names = p_uniform_names;
+ vertex_code = p_vertex_code;
+ fragment_code = p_fragment_code;
+ texunit_pairs = p_texunit_pairs;
+ texunit_pair_count = p_texunit_pair_count;
+ vertex_code_start = p_vertex_code_start;
+ fragment_code_start = p_fragment_code_start;
+ attribute_pairs = p_attribute_pairs;
+ attribute_pair_count = p_attribute_count;
+
+ {
+ String globals_tag = "\nVERTEX_SHADER_GLOBALS";
+ String code_tag = "\nVERTEX_SHADER_CODE";
+ String code = vertex_code;
+ int cpos = code.find(globals_tag);
+ if (cpos == -1) {
+ vertex_code0 = code.ascii();
+ } else {
+ vertex_code0 = code.substr(0, cpos).ascii();
+ code = code.substr(cpos + globals_tag.length(), code.length());
+
+ cpos = code.find(code_tag);
+
+ if (cpos == -1) {
+ vertex_code1 = code.ascii();
+ } else {
+ vertex_code1 = code.substr(0, cpos).ascii();
+ vertex_code2 = code.substr(cpos + code_tag.length(), code.length()).ascii();
+ }
+ }
+ }
+
+ {
+ String globals_tag = "\nFRAGMENT_SHADER_GLOBALS";
+ String code_tag = "\nFRAGMENT_SHADER_CODE";
+ String light_code_tag = "\nLIGHT_SHADER_CODE";
+ String code = fragment_code;
+ int cpos = code.find(globals_tag);
+ if (cpos == -1) {
+ fragment_code0 = code.ascii();
+ } else {
+ fragment_code0 = code.substr(0, cpos).ascii();
+ code = code.substr(cpos + globals_tag.length(), code.length());
+
+ cpos = code.find(code_tag);
+
+ if (cpos == -1) {
+ fragment_code1 = code.ascii();
+ } else {
+
+ fragment_code1 = code.substr(0, cpos).ascii();
+ String code2 = code.substr(cpos + code_tag.length(), code.length());
+
+ cpos = code2.find(light_code_tag);
+ if (cpos == -1) {
+ fragment_code2 = code2.ascii();
+ } else {
+ fragment_code2 = code2.substr(0, cpos).ascii();
+ fragment_code3 = code2.substr(cpos + light_code_tag.length(), code2.length()).ascii();
+ }
+ }
+ }
+ }
+}
+
+void ShaderGLES2::finish() {
+ const VersionKey *V = NULL;
+
+ while ((V = version_map.next(V))) {
+ Version &v = version_map[*V];
+ glDeleteShader(v.vert_id);
+ glDeleteShader(v.frag_id);
+ glDeleteProgram(v.id);
+ memdelete_arr(v.uniform_location);
+ }
+}
+
+void ShaderGLES2::clear_caches() {
+ const VersionKey *V = NULL;
+
+ while ((V = version_map.next(V))) {
+ Version &v = version_map[*V];
+ glDeleteShader(v.vert_id);
+ glDeleteShader(v.frag_id);
+ glDeleteProgram(v.id);
+ memdelete_arr(v.uniform_location);
+ }
+
+ version_map.clear();
+
+ custom_code_map.clear();
+ version = NULL;
+ last_custom_code = 1;
+ uniforms_dirty = true;
+}
+
+uint32_t ShaderGLES2::create_custom_shader() {
+ custom_code_map[last_custom_code] = CustomCode();
+ custom_code_map[last_custom_code].version = 1;
+ return last_custom_code++;
+}
+
+void ShaderGLES2::set_custom_shader_code(uint32_t p_code_id,
+ const String &p_vertex,
+ const String &p_vertex_globals,
+ const String &p_fragment,
+ const String &p_light,
+ const String &p_fragment_globals,
+ const Vector<StringName> &p_uniforms,
+ const Vector<StringName> &p_texture_uniforms,
+ const Vector<CharString> &p_custom_defines) {
+ CustomCode *cc = custom_code_map.getptr(p_code_id);
+ ERR_FAIL_COND(!cc);
+
+ cc->vertex = p_vertex;
+ cc->vertex_globals = p_vertex_globals;
+ cc->fragment = p_fragment;
+ cc->fragment_globals = p_fragment_globals;
+ cc->light = p_light;
+ cc->custom_uniforms = p_uniforms;
+ cc->custom_defines = p_custom_defines;
+ cc->version++;
+}
+
+void ShaderGLES2::set_custom_shader(uint32_t p_code_id) {
+ new_conditional_version.code_version = p_code_id;
+}
+
+void ShaderGLES2::free_custom_shader(uint32_t p_code_id) {
+ ERR_FAIL_COND(!custom_code_map.has(p_code_id));
+ if (conditional_version.code_version == p_code_id)
+ conditional_version.code_version = 0;
+
+ custom_code_map.erase(p_code_id);
+}
+
+void ShaderGLES2::set_base_material_tex_index(int p_idx) {
+}
+
+ShaderGLES2::ShaderGLES2() {
+ version = NULL;
+ last_custom_code = 1;
+ uniforms_dirty = true;
+}
+
+ShaderGLES2::~ShaderGLES2() {
+ finish();
+}
diff --git a/drivers/gles2/shader_gles2.h b/drivers/gles2/shader_gles2.h
new file mode 100644
index 0000000000..d92c1ddb62
--- /dev/null
+++ b/drivers/gles2/shader_gles2.h
@@ -0,0 +1,386 @@
+/*************************************************************************/
+/* shader_gles2.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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 SHADER_GLES2_H
+#define SHADER_GLES2_H
+
+#include <stdio.h>
+
+#include "platform_config.h"
+#ifndef GLES2_INCLUDE_H
+#include <GLES2/gl2.h>
+#else
+#include GLES2_INCLUDE_H
+#endif
+
+#include "camera_matrix.h"
+#include "hash_map.h"
+#include "map.h"
+#include "variant.h"
+
+class ShaderGLES2 {
+protected:
+ struct Enum {
+
+ uint64_t mask;
+ uint64_t shift;
+ const char *defines[16];
+ };
+
+ struct EnumValue {
+
+ uint64_t set_mask;
+ uint64_t clear_mask;
+ };
+
+ struct AttributePair {
+
+ const char *name;
+ int index;
+ };
+
+ struct UniformPair {
+ const char *name;
+ Variant::Type type_hint;
+ };
+
+ struct TexUnitPair {
+
+ const char *name;
+ int index;
+ };
+
+ bool uniforms_dirty;
+
+private:
+ //@TODO Optimize to a fixed set of shader pools and use a LRU
+ int uniform_count;
+ int texunit_pair_count;
+ int conditional_count;
+ int vertex_code_start;
+ int fragment_code_start;
+ int attribute_pair_count;
+
+ struct CustomCode {
+
+ String vertex;
+ String vertex_globals;
+ String fragment;
+ String fragment_globals;
+ String light;
+ uint32_t version;
+ Vector<StringName> texture_uniforms;
+ Vector<StringName> custom_uniforms;
+ Vector<CharString> custom_defines;
+ };
+
+ struct Version {
+
+ GLuint id;
+ GLuint vert_id;
+ GLuint frag_id;
+ GLint *uniform_location;
+ Vector<GLint> texture_uniform_locations;
+ Vector<GLint> custom_uniform_locations;
+ uint32_t code_version;
+ bool ok;
+ Version() {
+ code_version = 0;
+ ok = false;
+ uniform_location = NULL;
+ }
+ };
+
+ Version *version;
+
+ union VersionKey {
+
+ struct {
+ uint32_t version;
+ uint32_t code_version;
+ };
+ uint64_t key;
+ bool operator==(const VersionKey &p_key) const { return key == p_key.key; }
+ bool operator<(const VersionKey &p_key) const { return key < p_key.key; }
+ };
+
+ struct VersionKeyHash {
+
+ static _FORCE_INLINE_ uint32_t hash(const VersionKey &p_key) { return HashMapHasherDefault::hash(p_key.key); }
+ };
+
+ //this should use a way more cachefriendly version..
+ HashMap<VersionKey, Version, VersionKeyHash> version_map;
+
+ HashMap<uint32_t, CustomCode> custom_code_map;
+ uint32_t last_custom_code;
+
+ VersionKey conditional_version;
+ VersionKey new_conditional_version;
+
+ virtual String get_shader_name() const = 0;
+
+ const char **conditional_defines;
+ const char **uniform_names;
+ const AttributePair *attribute_pairs;
+ const TexUnitPair *texunit_pairs;
+ const char *vertex_code;
+ const char *fragment_code;
+ CharString fragment_code0;
+ CharString fragment_code1;
+ CharString fragment_code2;
+ CharString fragment_code3;
+
+ CharString vertex_code0;
+ CharString vertex_code1;
+ CharString vertex_code2;
+
+ Vector<CharString> custom_defines;
+
+ Version *get_current_version();
+
+ static ShaderGLES2 *active;
+
+ int max_image_units;
+
+ _FORCE_INLINE_ void _set_uniform_variant(GLint p_uniform, const Variant &p_value) {
+
+ if (p_uniform < 0)
+ return; // do none
+ switch (p_value.get_type()) {
+
+ case Variant::BOOL:
+ case Variant::INT: {
+
+ int val = p_value;
+ glUniform1i(p_uniform, val);
+ } break;
+ case Variant::REAL: {
+
+ real_t val = p_value;
+ glUniform1f(p_uniform, val);
+ } break;
+ case Variant::COLOR: {
+
+ Color val = p_value;
+ glUniform4f(p_uniform, val.r, val.g, val.b, val.a);
+ } break;
+ case Variant::VECTOR2: {
+
+ Vector2 val = p_value;
+ glUniform2f(p_uniform, val.x, val.y);
+ } break;
+ case Variant::VECTOR3: {
+
+ Vector3 val = p_value;
+ glUniform3f(p_uniform, val.x, val.y, val.z);
+ } break;
+ case Variant::PLANE: {
+
+ Plane val = p_value;
+ glUniform4f(p_uniform, val.normal.x, val.normal.y, val.normal.z, val.d);
+ } break;
+ case Variant::QUAT: {
+
+ Quat val = p_value;
+ glUniform4f(p_uniform, val.x, val.y, val.z, val.w);
+ } break;
+
+ case Variant::TRANSFORM2D: {
+
+ Transform2D tr = p_value;
+ GLfloat matrix[16] = { /* build a 16x16 matrix */
+ tr.elements[0][0],
+ tr.elements[0][1],
+ 0,
+ 0,
+ tr.elements[1][0],
+ tr.elements[1][1],
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ tr.elements[2][0],
+ tr.elements[2][1],
+ 0,
+ 1
+ };
+
+ glUniformMatrix4fv(p_uniform, 1, false, matrix);
+
+ } break;
+ case Variant::BASIS:
+ case Variant::TRANSFORM: {
+
+ Transform tr = p_value;
+ GLfloat matrix[16] = { /* build a 16x16 matrix */
+ tr.basis.elements[0][0],
+ tr.basis.elements[1][0],
+ tr.basis.elements[2][0],
+ 0,
+ tr.basis.elements[0][1],
+ tr.basis.elements[1][1],
+ tr.basis.elements[2][1],
+ 0,
+ tr.basis.elements[0][2],
+ tr.basis.elements[1][2],
+ tr.basis.elements[2][2],
+ 0,
+ tr.origin.x,
+ tr.origin.y,
+ tr.origin.z,
+ 1
+ };
+
+ glUniformMatrix4fv(p_uniform, 1, false, matrix);
+ } break;
+ default: { ERR_FAIL(); } // do nothing
+ }
+ }
+
+ Map<uint32_t, Variant> uniform_defaults;
+ Map<uint32_t, CameraMatrix> uniform_cameras;
+
+protected:
+ _FORCE_INLINE_ int _get_uniform(int p_which) const;
+ _FORCE_INLINE_ void _set_conditional(int p_which, bool p_value);
+
+ void setup(const char **p_conditional_defines,
+ int p_conditional_count,
+ const char **p_uniform_names,
+ int p_uniform_count,
+ const AttributePair *p_attribute_pairs,
+ int p_attribute_count,
+ const TexUnitPair *p_texunit_pairs,
+ int p_texunit_pair_count,
+ const char *p_vertex_code,
+ const char *p_fragment_code,
+ int p_vertex_code_start,
+ int p_fragment_code_start);
+
+ ShaderGLES2();
+
+public:
+ enum {
+ CUSTOM_SHADER_DISABLED = 0
+ };
+
+ GLint get_uniform_location(const String &p_name) const;
+ GLint get_uniform_location(int p_index) const;
+
+ static _FORCE_INLINE_ ShaderGLES2 *get_active() { return active; }
+ bool bind();
+ void unbind();
+ void bind_uniforms();
+
+ inline GLuint get_program() const { return version ? version->id : 0; }
+
+ void clear_caches();
+
+ uint32_t create_custom_shader();
+ void set_custom_shader_code(uint32_t p_code_id,
+ const String &p_vertex,
+ const String &p_vertex_globals,
+ const String &p_fragment,
+ const String &p_light,
+ const String &p_fragment_globals,
+ const Vector<StringName> &p_uniforms,
+ const Vector<StringName> &p_texture_uniforms,
+ const Vector<CharString> &p_custom_defines);
+
+ void set_custom_shader(uint32_t p_code_id);
+ void free_custom_shader(uint32_t p_code_id);
+
+ void set_uniform_default(int p_idx, const Variant &p_value) {
+
+ if (p_value.get_type() == Variant::NIL) {
+
+ uniform_defaults.erase(p_idx);
+ } else {
+
+ uniform_defaults[p_idx] = p_value;
+ }
+ uniforms_dirty = true;
+ }
+
+ uint32_t get_version() const { return new_conditional_version.version; }
+
+ void set_uniform_camera(int p_idx, const CameraMatrix &p_mat) {
+
+ uniform_cameras[p_idx] = p_mat;
+ uniforms_dirty = true;
+ }
+
+ _FORCE_INLINE_ void set_texture_uniform(int p_idx, const Variant &p_value) {
+
+ ERR_FAIL_COND(!version);
+ ERR_FAIL_INDEX(p_idx, version->texture_uniform_locations.size());
+ _set_uniform_variant(version->texture_uniform_locations[p_idx], p_value);
+ }
+
+ _FORCE_INLINE_ GLint get_texture_uniform_location(int p_idx) {
+
+ ERR_FAIL_COND_V(!version, -1);
+ ERR_FAIL_INDEX_V(p_idx, version->texture_uniform_locations.size(), -1);
+ return version->texture_uniform_locations[p_idx];
+ }
+
+ virtual void init() = 0;
+ void finish();
+
+ void set_base_material_tex_index(int p_idx);
+
+ void add_custom_define(const String &p_define) {
+ custom_defines.push_back(p_define.utf8());
+ }
+
+ virtual ~ShaderGLES2();
+};
+
+// called a lot, made inline
+
+int ShaderGLES2::_get_uniform(int p_which) const {
+
+ ERR_FAIL_INDEX_V(p_which, uniform_count, -1);
+ ERR_FAIL_COND_V(!version, -1);
+ return version->uniform_location[p_which];
+}
+
+void ShaderGLES2::_set_conditional(int p_which, bool p_value) {
+
+ ERR_FAIL_INDEX(p_which, conditional_count);
+ if (p_value)
+ new_conditional_version.version |= (1 << p_which);
+ else
+ new_conditional_version.version &= ~(1 << p_which);
+}
+
+#endif
diff --git a/drivers/gles2/shaders/SCsub b/drivers/gles2/shaders/SCsub
new file mode 100644
index 0000000000..5de3e1ac90
--- /dev/null
+++ b/drivers/gles2/shaders/SCsub
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+Import('env')
+
+if 'GLES2_GLSL' in env['BUILDERS']:
+ env.GLES2_GLSL('copy.glsl');
+# env.GLES2_GLSL('resolve.glsl');
+ env.GLES2_GLSL('canvas.glsl');
+# env.GLES2_GLSL('canvas_shadow.glsl');
+ env.GLES2_GLSL('scene.glsl');
+# env.GLES2_GLSL('cubemap_filter.glsl');
+# env.GLES2_GLSL('cube_to_dp.glsl');
+# env.GLES2_GLSL('blend_shape.glsl');
+# env.GLES2_GLSL('screen_space_reflection.glsl');
+# env.GLES2_GLSL('effect_blur.glsl');
+# env.GLES2_GLSL('subsurf_scattering.glsl');
+# env.GLES2_GLSL('ssao.glsl');
+# env.GLES2_GLSL('ssao_minify.glsl');
+# env.GLES2_GLSL('ssao_blur.glsl');
+# env.GLES2_GLSL('exposure.glsl');
+# env.GLES2_GLSL('tonemap.glsl');
+# env.GLES2_GLSL('particles.glsl');
diff --git a/drivers/gles2/shaders/blend_shape.glsl b/drivers/gles2/shaders/blend_shape.glsl
new file mode 100644
index 0000000000..4e0d066823
--- /dev/null
+++ b/drivers/gles2/shaders/blend_shape.glsl
@@ -0,0 +1,197 @@
+[vertex]
+
+
+/*
+from VisualServer:
+
+ARRAY_VERTEX=0,
+ARRAY_NORMAL=1,
+ARRAY_TANGENT=2,
+ARRAY_COLOR=3,
+ARRAY_TEX_UV=4,
+ARRAY_TEX_UV2=5,
+ARRAY_BONES=6,
+ARRAY_WEIGHTS=7,
+ARRAY_INDEX=8,
+*/
+
+#ifdef USE_2D_VERTEX
+#define VFORMAT vec2
+#else
+#define VFORMAT vec3
+#endif
+
+/* INPUT ATTRIBS */
+
+layout(location=0) in highp VFORMAT vertex_attrib;
+layout(location=1) in vec3 normal_attrib;
+
+#ifdef ENABLE_TANGENT
+layout(location=2) in vec4 tangent_attrib;
+#endif
+
+#ifdef ENABLE_COLOR
+layout(location=3) in vec4 color_attrib;
+#endif
+
+#ifdef ENABLE_UV
+layout(location=4) in vec2 uv_attrib;
+#endif
+
+#ifdef ENABLE_UV2
+layout(location=5) in vec2 uv2_attrib;
+#endif
+
+#ifdef ENABLE_SKELETON
+layout(location=6) in ivec4 bone_attrib;
+layout(location=7) in vec4 weight_attrib;
+#endif
+
+/* BLEND ATTRIBS */
+
+#ifdef ENABLE_BLEND
+
+layout(location=8) in highp VFORMAT vertex_attrib_blend;
+layout(location=9) in vec3 normal_attrib_blend;
+
+#ifdef ENABLE_TANGENT
+layout(location=10) in vec4 tangent_attrib_blend;
+#endif
+
+#ifdef ENABLE_COLOR
+layout(location=11) in vec4 color_attrib_blend;
+#endif
+
+#ifdef ENABLE_UV
+layout(location=12) in vec2 uv_attrib_blend;
+#endif
+
+#ifdef ENABLE_UV2
+layout(location=13) in vec2 uv2_attrib_blend;
+#endif
+
+#ifdef ENABLE_SKELETON
+layout(location=14) in ivec4 bone_attrib_blend;
+layout(location=15) in vec4 weight_attrib_blend;
+#endif
+
+#endif
+
+/* OUTPUTS */
+
+out VFORMAT vertex_out; //tfb:
+
+#ifdef ENABLE_NORMAL
+out vec3 normal_out; //tfb:ENABLE_NORMAL
+#endif
+
+#ifdef ENABLE_TANGENT
+out vec4 tangent_out; //tfb:ENABLE_TANGENT
+#endif
+
+#ifdef ENABLE_COLOR
+out vec4 color_out; //tfb:ENABLE_COLOR
+#endif
+
+#ifdef ENABLE_UV
+out vec2 uv_out; //tfb:ENABLE_UV
+#endif
+
+#ifdef ENABLE_UV2
+out vec2 uv2_out; //tfb:ENABLE_UV2
+#endif
+
+#ifdef ENABLE_SKELETON
+out ivec4 bone_out; //tfb:ENABLE_SKELETON
+out vec4 weight_out; //tfb:ENABLE_SKELETON
+#endif
+
+uniform float blend_amount;
+
+void main() {
+
+
+#ifdef ENABLE_BLEND
+
+ vertex_out = vertex_attrib_blend + vertex_attrib * blend_amount;
+
+#ifdef ENABLE_NORMAL
+ normal_out = normal_attrib_blend + normal_attrib * blend_amount;
+#endif
+
+#ifdef ENABLE_TANGENT
+
+ tangent_out.xyz = tangent_attrib_blend.xyz + tangent_attrib.xyz * blend_amount;
+ tangent_out.w = tangent_attrib_blend.w; //just copy, no point in blending his
+#endif
+
+#ifdef ENABLE_COLOR
+
+ color_out = color_attrib_blend + color_attrib * blend_amount;
+#endif
+
+#ifdef ENABLE_UV
+
+ uv_out = uv_attrib_blend + uv_attrib * blend_amount;
+#endif
+
+#ifdef ENABLE_UV2
+
+ uv2_out = uv2_attrib_blend + uv2_attrib * blend_amount;
+#endif
+
+
+#ifdef ENABLE_SKELETON
+
+ bone_out = bone_attrib_blend;
+ weight_out = weight_attrib_blend + weight_attrib * blend_amount;
+#endif
+
+#else //ENABLE_BLEND
+
+
+ vertex_out = vertex_attrib * blend_amount;
+
+#ifdef ENABLE_NORMAL
+ normal_out = normal_attrib * blend_amount;
+#endif
+
+#ifdef ENABLE_TANGENT
+
+ tangent_out.xyz = tangent_attrib.xyz * blend_amount;
+ tangent_out.w = tangent_attrib.w; //just copy, no point in blending his
+#endif
+
+#ifdef ENABLE_COLOR
+
+ color_out = color_attrib * blend_amount;
+#endif
+
+#ifdef ENABLE_UV
+
+ uv_out = uv_attrib * blend_amount;
+#endif
+
+#ifdef ENABLE_UV2
+
+ uv2_out = uv2_attrib * blend_amount;
+#endif
+
+
+#ifdef ENABLE_SKELETON
+
+ bone_out = bone_attrib;
+ weight_out = weight_attrib * blend_amount;
+#endif
+
+#endif
+ gl_Position = vec4(0.0);
+}
+
+[fragment]
+
+
+void main() {
+
+}
+
diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl
new file mode 100644
index 0000000000..11c6ab9b76
--- /dev/null
+++ b/drivers/gles2/shaders/canvas.glsl
@@ -0,0 +1,141 @@
+[vertex]
+
+#ifdef USE_GLES_OVER_GL
+#define mediump
+#define highp
+#else
+precision mediump float;
+precision mediump int;
+#endif
+
+uniform highp mat4 projection_matrix;
+uniform highp mat4 modelview_matrix;
+uniform highp mat4 extra_matrix;
+attribute highp vec2 vertex; // attrib:0
+attribute vec4 color_attrib; // attrib:3
+attribute vec2 uv_attrib; // attrib:4
+
+varying vec2 uv_interp;
+varying vec4 color_interp;
+
+uniform highp vec2 color_texpixel_size;
+
+#ifdef USE_TEXTURE_RECT
+
+uniform vec4 dst_rect;
+uniform vec4 src_rect;
+
+#endif
+
+uniform bool blit_pass;
+
+VERTEX_SHADER_GLOBALS
+
+vec2 select(vec2 a, vec2 b, bvec2 c) {
+ vec2 ret;
+
+ ret.x = c.x ? b.x : a.x;
+ ret.y = c.y ? b.y : a.y;
+
+ return ret;
+}
+
+void main() {
+
+ vec4 color = color_attrib;
+
+#ifdef USE_TEXTURE_RECT
+
+ if (dst_rect.z < 0.0) { // Transpose is encoded as negative dst_rect.z
+ uv_interp = src_rect.xy + abs(src_rect.zw) * vertex.yx;
+ } else {
+ uv_interp = src_rect.xy + abs(src_rect.zw) * vertex;
+ }
+
+ vec4 outvec = vec4(0.0, 0.0, 0.0, 1.0);
+
+ // This is what is done in the GLES 3 bindings and should
+ // take care of flipped rects.
+ //
+ // But it doesn't.
+ // I don't know why, will need to investigate further.
+
+ outvec.xy = dst_rect.xy + abs(dst_rect.zw) * select(vertex, vec2(1.0, 1.0) - vertex, lessThan(src_rect.zw, vec2(0.0, 0.0)));
+
+ // outvec.xy = dst_rect.xy + abs(dst_rect.zw) * vertex;
+#else
+ vec4 outvec = vec4(vertex.xy, 0.0, 1.0);
+
+#ifdef USE_UV_ATTRIBUTE
+ uv_interp = uv_attrib;
+#else
+ uv_interp = vertex.xy;
+#endif
+
+#endif
+
+{
+ vec2 src_vtx=outvec.xy;
+VERTEX_SHADER_CODE
+
+}
+
+ color_interp = color;
+
+ gl_Position = projection_matrix * modelview_matrix * outvec;
+
+}
+
+[fragment]
+
+#ifdef USE_GLES_OVER_GL
+#define mediump
+#define highp
+#else
+precision mediump float;
+precision mediump int;
+#endif
+
+uniform sampler2D color_texture; // texunit:0
+uniform highp vec2 color_texpixel_size;
+uniform mediump sampler2D normal_texture; // texunit:1
+
+varying mediump vec2 uv_interp;
+varying mediump vec4 color_interp;
+
+uniform bool blit_pass;
+
+uniform vec4 final_modulate;
+
+#ifdef SCREEN_TEXTURE_USED
+
+uniform sampler2D screen_texture; // texunit:2
+
+#endif
+
+#ifdef SCREEN_UV_USED
+
+uniform vec2 screen_pixel_size;
+
+#endif
+
+FRAGMENT_SHADER_GLOBALS
+
+
+void main() {
+
+ vec4 color = color_interp;
+
+ color *= texture2D(color_texture, uv_interp);
+{
+
+FRAGMENT_SHADER_CODE
+
+
+}
+
+ color *= final_modulate;
+
+ gl_FragColor = color;
+
+}
diff --git a/drivers/gles2/shaders/canvas_shadow.glsl b/drivers/gles2/shaders/canvas_shadow.glsl
new file mode 100644
index 0000000000..c757990de0
--- /dev/null
+++ b/drivers/gles2/shaders/canvas_shadow.glsl
@@ -0,0 +1,49 @@
+[vertex]
+
+
+
+uniform highp mat4 projection_matrix;
+uniform highp mat4 light_matrix;
+uniform highp mat4 world_matrix;
+uniform highp float distance_norm;
+
+layout(location=0) in highp vec3 vertex;
+
+out highp vec4 position_interp;
+
+void main() {
+
+ gl_Position = projection_matrix * (light_matrix * (world_matrix * vec4(vertex,1.0)));
+ position_interp=gl_Position;
+}
+
+[fragment]
+
+in highp vec4 position_interp;
+
+#ifdef USE_RGBA_SHADOWS
+
+layout(location=0) out lowp vec4 distance_buf;
+
+#else
+
+layout(location=0) out highp float distance_buf;
+
+#endif
+
+void main() {
+
+ highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0;//bias;
+
+#ifdef USE_RGBA_SHADOWS
+
+ highp vec4 comp = fract(depth * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0));
+ comp -= comp.xxyz * vec4(0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
+ distance_buf=comp;
+#else
+
+ distance_buf=depth;
+
+#endif
+}
+
diff --git a/drivers/gles2/shaders/copy.glsl b/drivers/gles2/shaders/copy.glsl
new file mode 100644
index 0000000000..a21da68525
--- /dev/null
+++ b/drivers/gles2/shaders/copy.glsl
@@ -0,0 +1,72 @@
+[vertex]
+
+#ifdef USE_GLES_OVER_GL
+#define mediump
+#define highp
+#else
+precision mediump float;
+precision mediump int;
+#endif
+
+attribute highp vec4 vertex_attrib; // attrib:0
+attribute vec2 uv_in; // attrib:4
+attribute vec2 uv2_in; // attrib:5
+
+varying vec2 uv_interp;
+
+varying vec2 uv2_interp;
+
+#ifdef USE_COPY_SECTION
+uniform vec4 copy_section;
+#endif
+
+void main() {
+
+ uv_interp = uv_in;
+ uv2_interp = uv2_in;
+ gl_Position = vertex_attrib;
+
+#ifdef USE_COPY_SECTION
+ uv_interp = copy_section.xy + uv_interp * copy_section.zw;
+ gl_Position.xy = (copy_section.xy + (gl_Position.xy * 0.5 + 0.5) * copy_section.zw) * 2.0 - 1.0;
+#endif
+}
+
+[fragment]
+
+#ifdef USE_GLES_OVER_GL
+#define mediump
+#define highp
+#else
+precision mediump float;
+precision mediump int;
+#endif
+
+
+varying vec2 uv_interp;
+uniform sampler2D source; // texunit:0
+
+varying vec2 uv2_interp;
+
+#ifdef USE_CUSTOM_ALPHA
+uniform float custom_alpha;
+#endif
+
+
+void main() {
+
+ //vec4 color = color_interp;
+ vec4 color = texture2D( source, uv_interp );
+
+
+#ifdef USE_NO_ALPHA
+ color.a=1.0;
+#endif
+
+#ifdef USE_CUSTOM_ALPHA
+ color.a=custom_alpha;
+#endif
+
+
+ gl_FragColor = color;
+}
diff --git a/drivers/gles2/shaders/cube_to_dp.glsl b/drivers/gles2/shaders/cube_to_dp.glsl
new file mode 100644
index 0000000000..5ffc78c0b9
--- /dev/null
+++ b/drivers/gles2/shaders/cube_to_dp.glsl
@@ -0,0 +1,79 @@
+[vertex]
+
+
+layout(location=0) in highp vec4 vertex_attrib;
+layout(location=4) in vec2 uv_in;
+
+out vec2 uv_interp;
+
+void main() {
+
+ uv_interp = uv_in;
+ gl_Position = vertex_attrib;
+}
+
+[fragment]
+
+
+uniform highp samplerCube source_cube; //texunit:0
+in vec2 uv_interp;
+
+uniform bool z_flip;
+uniform highp float z_far;
+uniform highp float z_near;
+uniform highp float bias;
+
+void main() {
+
+ highp vec3 normal = vec3( uv_interp * 2.0 - 1.0, 0.0 );
+/*
+ if(z_flip) {
+ normal.z = 0.5 - 0.5*((normal.x * normal.x) + (normal.y * normal.y));
+ } else {
+ normal.z = -0.5 + 0.5*((normal.x * normal.x) + (normal.y * normal.y));
+ }
+*/
+
+ //normal.z = sqrt(1.0-dot(normal.xy,normal.xy));
+ //normal.xy*=1.0+normal.z;
+
+ normal.z = 0.5 - 0.5*((normal.x * normal.x) + (normal.y * normal.y));
+ normal = normalize(normal);
+
+/*
+ normal.z=0.5;
+ normal=normalize(normal);
+*/
+ if (!z_flip) {
+ normal.z=-normal.z;
+ }
+
+ //normal = normalize(vec3( uv_interp * 2.0 - 1.0, 1.0 ));
+ float depth = texture(source_cube,normal).r;
+
+ // absolute values for direction cosines, bigger value equals closer to basis axis
+ vec3 unorm = abs(normal);
+
+ if ( (unorm.x >= unorm.y) && (unorm.x >= unorm.z) ) {
+ // x code
+ unorm = normal.x > 0.0 ? vec3( 1.0, 0.0, 0.0 ) : vec3( -1.0, 0.0, 0.0 ) ;
+ } else if ( (unorm.y > unorm.x) && (unorm.y >= unorm.z) ) {
+ // y code
+ unorm = normal.y > 0.0 ? vec3( 0.0, 1.0, 0.0 ) : vec3( 0.0, -1.0, 0.0 ) ;
+ } else if ( (unorm.z > unorm.x) && (unorm.z > unorm.y) ) {
+ // z code
+ unorm = normal.z > 0.0 ? vec3( 0.0, 0.0, 1.0 ) : vec3( 0.0, 0.0, -1.0 ) ;
+ } else {
+ // oh-no we messed up code
+ // has to be
+ unorm = vec3( 1.0, 0.0, 0.0 );
+ }
+
+ float depth_fix = 1.0 / dot(normal,unorm);
+
+
+ depth = 2.0 * depth - 1.0;
+ float linear_depth = 2.0 * z_near * z_far / (z_far + z_near - depth * (z_far - z_near));
+ gl_FragDepth = (linear_depth*depth_fix+bias) / z_far;
+}
+
diff --git a/drivers/gles2/shaders/cubemap_filter.glsl b/drivers/gles2/shaders/cubemap_filter.glsl
new file mode 100644
index 0000000000..485fbb6ee0
--- /dev/null
+++ b/drivers/gles2/shaders/cubemap_filter.glsl
@@ -0,0 +1,294 @@
+[vertex]
+
+
+layout(location=0) in highp vec2 vertex;
+
+layout(location=4) in highp vec2 uv;
+
+out highp vec2 uv_interp;
+
+void main() {
+
+ uv_interp=uv;
+ gl_Position=vec4(vertex,0,1);
+}
+
+[fragment]
+
+
+precision highp float;
+precision highp int;
+
+#ifdef USE_SOURCE_PANORAMA
+uniform sampler2D source_panorama; //texunit:0
+#endif
+
+#ifdef USE_SOURCE_DUAL_PARABOLOID_ARRAY
+uniform sampler2DArray source_dual_paraboloid_array; //texunit:0
+uniform int source_array_index;
+#endif
+
+#if !defined(USE_SOURCE_DUAL_PARABOLOID_ARRAY) && !defined(USE_SOURCE_PANORAMA)
+uniform samplerCube source_cube; //texunit:0
+#endif
+
+uniform int face_id;
+uniform float roughness;
+in highp vec2 uv_interp;
+
+
+layout(location = 0) out vec4 frag_color;
+
+
+#define M_PI 3.14159265359
+
+
+vec3 texelCoordToVec(vec2 uv, int faceID)
+{
+ mat3 faceUvVectors[6];
+/*
+ // -x
+ faceUvVectors[1][0] = vec3(0.0, 0.0, 1.0); // u -> +z
+ faceUvVectors[1][1] = vec3(0.0, -1.0, 0.0); // v -> -y
+ faceUvVectors[1][2] = vec3(-1.0, 0.0, 0.0); // -x face
+
+ // +x
+ faceUvVectors[0][0] = vec3(0.0, 0.0, -1.0); // u -> -z
+ faceUvVectors[0][1] = vec3(0.0, -1.0, 0.0); // v -> -y
+ faceUvVectors[0][2] = vec3(1.0, 0.0, 0.0); // +x face
+
+ // -y
+ faceUvVectors[3][0] = vec3(1.0, 0.0, 0.0); // u -> +x
+ faceUvVectors[3][1] = vec3(0.0, 0.0, -1.0); // v -> -z
+ faceUvVectors[3][2] = vec3(0.0, -1.0, 0.0); // -y face
+
+ // +y
+ faceUvVectors[2][0] = vec3(1.0, 0.0, 0.0); // u -> +x
+ faceUvVectors[2][1] = vec3(0.0, 0.0, 1.0); // v -> +z
+ faceUvVectors[2][2] = vec3(0.0, 1.0, 0.0); // +y face
+
+ // -z
+ faceUvVectors[5][0] = vec3(-1.0, 0.0, 0.0); // u -> -x
+ faceUvVectors[5][1] = vec3(0.0, -1.0, 0.0); // v -> -y
+ faceUvVectors[5][2] = vec3(0.0, 0.0, -1.0); // -z face
+
+ // +z
+ faceUvVectors[4][0] = vec3(1.0, 0.0, 0.0); // u -> +x
+ faceUvVectors[4][1] = vec3(0.0, -1.0, 0.0); // v -> -y
+ faceUvVectors[4][2] = vec3(0.0, 0.0, 1.0); // +z face
+*/
+
+ // -x
+ faceUvVectors[0][0] = vec3(0.0, 0.0, 1.0); // u -> +z
+ faceUvVectors[0][1] = vec3(0.0, -1.0, 0.0); // v -> -y
+ faceUvVectors[0][2] = vec3(-1.0, 0.0, 0.0); // -x face
+
+ // +x
+ faceUvVectors[1][0] = vec3(0.0, 0.0, -1.0); // u -> -z
+ faceUvVectors[1][1] = vec3(0.0, -1.0, 0.0); // v -> -y
+ faceUvVectors[1][2] = vec3(1.0, 0.0, 0.0); // +x face
+
+ // -y
+ faceUvVectors[2][0] = vec3(1.0, 0.0, 0.0); // u -> +x
+ faceUvVectors[2][1] = vec3(0.0, 0.0, -1.0); // v -> -z
+ faceUvVectors[2][2] = vec3(0.0, -1.0, 0.0); // -y face
+
+ // +y
+ faceUvVectors[3][0] = vec3(1.0, 0.0, 0.0); // u -> +x
+ faceUvVectors[3][1] = vec3(0.0, 0.0, 1.0); // v -> +z
+ faceUvVectors[3][2] = vec3(0.0, 1.0, 0.0); // +y face
+
+ // -z
+ faceUvVectors[4][0] = vec3(-1.0, 0.0, 0.0); // u -> -x
+ faceUvVectors[4][1] = vec3(0.0, -1.0, 0.0); // v -> -y
+ faceUvVectors[4][2] = vec3(0.0, 0.0, -1.0); // -z face
+
+ // +z
+ faceUvVectors[5][0] = vec3(1.0, 0.0, 0.0); // u -> +x
+ faceUvVectors[5][1] = vec3(0.0, -1.0, 0.0); // v -> -y
+ faceUvVectors[5][2] = vec3(0.0, 0.0, 1.0); // +z face
+
+ // out = u * s_faceUv[0] + v * s_faceUv[1] + s_faceUv[2].
+ vec3 result = (faceUvVectors[faceID][0] * uv.x) + (faceUvVectors[faceID][1] * uv.y) + faceUvVectors[faceID][2];
+ return normalize(result);
+}
+
+vec3 ImportanceSampleGGX(vec2 Xi, float Roughness, vec3 N)
+{
+ float a = Roughness * Roughness; // DISNEY'S ROUGHNESS [see Burley'12 siggraph]
+
+ // Compute distribution direction
+ float Phi = 2.0 * M_PI * Xi.x;
+ float CosTheta = sqrt((1.0 - Xi.y) / (1.0 + (a*a - 1.0) * Xi.y));
+ float SinTheta = sqrt(1.0 - CosTheta * CosTheta);
+
+ // Convert to spherical direction
+ vec3 H;
+ H.x = SinTheta * cos(Phi);
+ H.y = SinTheta * sin(Phi);
+ H.z = CosTheta;
+
+ vec3 UpVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
+ vec3 TangentX = normalize(cross(UpVector, N));
+ vec3 TangentY = cross(N, TangentX);
+
+ // Tangent to world space
+ return TangentX * H.x + TangentY * H.y + N * H.z;
+}
+
+// http://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
+float G_Smith(float a, float nDotV, float nDotL)
+{
+ return GGX(nDotL, a * a) * GGX(nDotV, a * a);
+}
+
+float radicalInverse_VdC(uint bits) {
+ bits = (bits << 16u) | (bits >> 16u);
+ bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
+ bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
+ bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
+ bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
+ return float(bits) * 2.3283064365386963e-10; // / 0x100000000
+}
+
+vec2 Hammersley(uint i, uint N) {
+ return vec2(float(i)/float(N), radicalInverse_VdC(i));
+}
+
+
+
+#ifdef LOW_QUALITY
+
+#define SAMPLE_COUNT 64u
+
+#else
+
+#define SAMPLE_COUNT 512u
+
+#endif
+
+uniform bool z_flip;
+
+#ifdef USE_SOURCE_PANORAMA
+
+vec4 texturePanorama(vec3 normal,sampler2D pano ) {
+
+ vec2 st = vec2(
+ atan(normal.x, normal.z),
+ acos(normal.y)
+ );
+
+ if(st.x < 0.0)
+ st.x += M_PI*2.0;
+
+ st/=vec2(M_PI*2.0,M_PI);
+
+ return textureLod(pano,st,0.0);
+
+}
+
+#endif
+
+#ifdef USE_SOURCE_DUAL_PARABOLOID_ARRAY
+
+
+vec4 textureDualParaboloidArray(vec3 normal) {
+
+ vec3 norm = normalize(normal);
+ norm.xy/=1.0+abs(norm.z);
+ norm.xy=norm.xy * vec2(0.5,0.25) + vec2(0.5,0.25);
+ if (norm.z<0.0) {
+ norm.y=0.5-norm.y+0.5;
+ }
+ return textureLod(source_dual_paraboloid_array, vec3(norm.xy, float(source_array_index) ), 0.0);
+
+}
+
+#endif
+
+void main() {
+
+#ifdef USE_DUAL_PARABOLOID
+
+ vec3 N = vec3( uv_interp * 2.0 - 1.0, 0.0 );
+ N.z = 0.5 - 0.5*((N.x * N.x) + (N.y * N.y));
+ N = normalize(N);
+
+ if (z_flip) {
+ N.y=-N.y; //y is flipped to improve blending between both sides
+ N.z=-N.z;
+ }
+
+
+#else
+ vec2 uv = (uv_interp * 2.0) - 1.0;
+ vec3 N = texelCoordToVec(uv, face_id);
+#endif
+ //vec4 color = color_interp;
+
+#ifdef USE_DIRECT_WRITE
+
+#ifdef USE_SOURCE_PANORAMA
+
+ frag_color=vec4(texturePanorama(N,source_panorama).rgb,1.0);
+#endif
+
+#ifdef USE_SOURCE_DUAL_PARABOLOID_ARRAY
+
+ frag_color=vec4(textureDualParaboloidArray(N).rgb,1.0);
+#endif
+
+#if !defined(USE_SOURCE_DUAL_PARABOLOID_ARRAY) && !defined(USE_SOURCE_PANORAMA)
+
+ N.y=-N.y;
+ frag_color=vec4(texture(N,source_cube).rgb,1.0);
+#endif
+
+
+
+
+#else
+
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+
+ for(uint sampleNum = 0u; sampleNum < SAMPLE_COUNT; sampleNum++) {
+ vec2 xi = Hammersley(sampleNum, SAMPLE_COUNT);
+
+ vec3 H = ImportanceSampleGGX( xi, roughness, N );
+ vec3 V = N;
+ vec3 L = normalize(2.0 * dot( V, H ) * H - V);
+
+ float ndotl = clamp(dot(N, L),0.0,1.0);
+
+ if (ndotl>0.0) {
+#ifdef USE_SOURCE_PANORAMA
+ sum.rgb += texturePanorama(H,source_panorama).rgb *ndotl;
+#endif
+
+#ifdef USE_SOURCE_DUAL_PARABOLOID_ARRAY
+
+ sum.rgb += textureDualParaboloidArray(H).rgb *ndotl;
+#endif
+
+#if !defined(USE_SOURCE_DUAL_PARABOLOID_ARRAY) && !defined(USE_SOURCE_PANORAMA)
+ H.y=-H.y;
+ sum.rgb += textureLod(source_cube, H, 0.0).rgb *ndotl;
+#endif
+ sum.a += ndotl;
+ }
+ }
+ sum /= sum.a;
+
+ frag_color = vec4(sum.rgb, 1.0);
+
+#endif
+
+}
+
diff --git a/drivers/gles2/shaders/effect_blur.glsl b/drivers/gles2/shaders/effect_blur.glsl
new file mode 100644
index 0000000000..b5f98a1244
--- /dev/null
+++ b/drivers/gles2/shaders/effect_blur.glsl
@@ -0,0 +1,301 @@
+[vertex]
+
+
+layout(location=0) in highp vec4 vertex_attrib;
+layout(location=4) in vec2 uv_in;
+
+out vec2 uv_interp;
+
+#ifdef USE_BLUR_SECTION
+
+uniform vec4 blur_section;
+
+#endif
+
+void main() {
+
+ uv_interp = uv_in;
+ gl_Position = vertex_attrib;
+#ifdef USE_BLUR_SECTION
+
+ uv_interp = blur_section.xy + uv_interp * blur_section.zw;
+ gl_Position.xy = (blur_section.xy + (gl_Position.xy * 0.5 + 0.5) * blur_section.zw) * 2.0 - 1.0;
+#endif
+}
+
+[fragment]
+
+#if !defined(GLES_OVER_GL)
+precision mediump float;
+#endif
+
+in vec2 uv_interp;
+uniform sampler2D source_color; //texunit:0
+
+#ifdef SSAO_MERGE
+uniform sampler2D source_ssao; //texunit:1
+#endif
+
+uniform float lod;
+uniform vec2 pixel_size;
+
+
+layout(location = 0) out vec4 frag_color;
+
+#ifdef SSAO_MERGE
+
+uniform vec4 ssao_color;
+
+#endif
+
+#if defined (GLOW_GAUSSIAN_HORIZONTAL) || defined(GLOW_GAUSSIAN_VERTICAL)
+
+uniform float glow_strength;
+
+#endif
+
+#if defined(DOF_FAR_BLUR) || defined (DOF_NEAR_BLUR)
+
+#ifdef DOF_QUALITY_LOW
+const int dof_kernel_size=5;
+const int dof_kernel_from=2;
+const float dof_kernel[5] = float[] (0.153388,0.221461,0.250301,0.221461,0.153388);
+#endif
+
+#ifdef DOF_QUALITY_MEDIUM
+const int dof_kernel_size=11;
+const int dof_kernel_from=5;
+const float dof_kernel[11] = float[] (0.055037,0.072806,0.090506,0.105726,0.116061,0.119726,0.116061,0.105726,0.090506,0.072806,0.055037);
+
+#endif
+
+#ifdef DOF_QUALITY_HIGH
+const int dof_kernel_size=21;
+const int dof_kernel_from=10;
+const float dof_kernel[21] = float[] (0.028174,0.032676,0.037311,0.041944,0.046421,0.050582,0.054261,0.057307,0.059587,0.060998,0.061476,0.060998,0.059587,0.057307,0.054261,0.050582,0.046421,0.041944,0.037311,0.032676,0.028174);
+#endif
+
+uniform sampler2D dof_source_depth; //texunit:1
+uniform float dof_begin;
+uniform float dof_end;
+uniform vec2 dof_dir;
+uniform float dof_radius;
+
+#ifdef DOF_NEAR_BLUR_MERGE
+
+uniform sampler2D source_dof_original; //texunit:2
+#endif
+
+#endif
+
+
+#ifdef GLOW_FIRST_PASS
+
+uniform float exposure;
+uniform float white;
+
+#ifdef GLOW_USE_AUTO_EXPOSURE
+
+uniform highp sampler2D source_auto_exposure; //texunit:1
+uniform highp float auto_exposure_grey;
+
+#endif
+
+uniform float glow_bloom;
+uniform float glow_hdr_threshold;
+uniform float glow_hdr_scale;
+
+#endif
+
+uniform float camera_z_far;
+uniform float camera_z_near;
+
+void main() {
+
+
+
+#ifdef GAUSSIAN_HORIZONTAL
+ vec2 pix_size = pixel_size;
+ pix_size*=0.5; //reading from larger buffer, so use more samples
+ vec4 color =textureLod( source_color, uv_interp+vec2( 0.0, 0.0)*pix_size,lod )*0.214607;
+ color+=textureLod( source_color, uv_interp+vec2( 1.0, 0.0)*pix_size,lod )*0.189879;
+ color+=textureLod( source_color, uv_interp+vec2( 2.0, 0.0)*pix_size,lod )*0.157305;
+ color+=textureLod( source_color, uv_interp+vec2( 3.0, 0.0)*pix_size,lod )*0.071303;
+ color+=textureLod( source_color, uv_interp+vec2(-1.0, 0.0)*pix_size,lod )*0.189879;
+ color+=textureLod( source_color, uv_interp+vec2(-2.0, 0.0)*pix_size,lod )*0.157305;
+ color+=textureLod( source_color, uv_interp+vec2(-3.0, 0.0)*pix_size,lod )*0.071303;
+ frag_color = color;
+#endif
+
+#ifdef GAUSSIAN_VERTICAL
+ vec4 color =textureLod( source_color, uv_interp+vec2( 0.0, 0.0)*pixel_size,lod )*0.38774;
+ color+=textureLod( source_color, uv_interp+vec2( 0.0, 1.0)*pixel_size,lod )*0.24477;
+ color+=textureLod( source_color, uv_interp+vec2( 0.0, 2.0)*pixel_size,lod )*0.06136;
+ color+=textureLod( source_color, uv_interp+vec2( 0.0,-1.0)*pixel_size,lod )*0.24477;
+ color+=textureLod( source_color, uv_interp+vec2( 0.0,-2.0)*pixel_size,lod )*0.06136;
+ frag_color = color;
+#endif
+
+//glow uses larger sigma for a more rounded blur effect
+
+#ifdef GLOW_GAUSSIAN_HORIZONTAL
+ vec2 pix_size = pixel_size;
+ pix_size*=0.5; //reading from larger buffer, so use more samples
+ vec4 color =textureLod( source_color, uv_interp+vec2( 0.0, 0.0)*pix_size,lod )*0.174938;
+ color+=textureLod( source_color, uv_interp+vec2( 1.0, 0.0)*pix_size,lod )*0.165569;
+ color+=textureLod( source_color, uv_interp+vec2( 2.0, 0.0)*pix_size,lod )*0.140367;
+ color+=textureLod( source_color, uv_interp+vec2( 3.0, 0.0)*pix_size,lod )*0.106595;
+ color+=textureLod( source_color, uv_interp+vec2(-1.0, 0.0)*pix_size,lod )*0.165569;
+ color+=textureLod( source_color, uv_interp+vec2(-2.0, 0.0)*pix_size,lod )*0.140367;
+ color+=textureLod( source_color, uv_interp+vec2(-3.0, 0.0)*pix_size,lod )*0.106595;
+ color*=glow_strength;
+ frag_color = color;
+#endif
+
+#ifdef GLOW_GAUSSIAN_VERTICAL
+ vec4 color =textureLod( source_color, uv_interp+vec2(0.0, 0.0)*pixel_size,lod )*0.288713;
+ color+=textureLod( source_color, uv_interp+vec2(0.0, 1.0)*pixel_size,lod )*0.233062;
+ color+=textureLod( source_color, uv_interp+vec2(0.0, 2.0)*pixel_size,lod )*0.122581;
+ color+=textureLod( source_color, uv_interp+vec2(0.0,-1.0)*pixel_size,lod )*0.233062;
+ color+=textureLod( source_color, uv_interp+vec2(0.0,-2.0)*pixel_size,lod )*0.122581;
+ color*=glow_strength;
+ frag_color = color;
+#endif
+
+#ifdef DOF_FAR_BLUR
+
+ vec4 color_accum = vec4(0.0);
+
+ float depth = textureLod( dof_source_depth, uv_interp, 0.0).r;
+ depth = depth * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ depth = ((depth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
+ depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - depth * (camera_z_far - camera_z_near));
+#endif
+
+ float amount = smoothstep(dof_begin,dof_end,depth);
+ float k_accum=0.0;
+
+ for(int i=0;i<dof_kernel_size;i++) {
+
+ int int_ofs = i-dof_kernel_from;
+ vec2 tap_uv = uv_interp + dof_dir * float(int_ofs) * amount * dof_radius;
+
+ float tap_k = dof_kernel[i];
+
+ float tap_depth = texture( dof_source_depth, tap_uv, 0.0).r;
+ tap_depth = tap_depth * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ tap_depth = ((tap_depth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
+ tap_depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - tap_depth * (camera_z_far - camera_z_near));
+#endif
+ float tap_amount = mix(smoothstep(dof_begin,dof_end,tap_depth),1.0,int_ofs==0);
+ tap_amount*=tap_amount*tap_amount; //prevent undesired glow effect
+
+ vec4 tap_color = textureLod( source_color, tap_uv, 0.0) * tap_k;
+
+ k_accum+=tap_k*tap_amount;
+ color_accum+=tap_color*tap_amount;
+
+
+ }
+
+ if (k_accum>0.0) {
+ color_accum/=k_accum;
+ }
+
+ frag_color = color_accum;///k_accum;
+
+#endif
+
+#ifdef DOF_NEAR_BLUR
+
+ vec4 color_accum = vec4(0.0);
+
+ float max_accum=0;
+
+ for(int i=0;i<dof_kernel_size;i++) {
+
+ int int_ofs = i-dof_kernel_from;
+ vec2 tap_uv = uv_interp + dof_dir * float(int_ofs) * dof_radius;
+ float ofs_influence = max(0.0,1.0-float(abs(int_ofs))/float(dof_kernel_from));
+
+ float tap_k = dof_kernel[i];
+
+ vec4 tap_color = textureLod( source_color, tap_uv, 0.0);
+
+ float tap_depth = texture( dof_source_depth, tap_uv, 0.0).r;
+ tap_depth = tap_depth * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ tap_depth = ((tap_depth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
+ tap_depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - tap_depth * (camera_z_far - camera_z_near));
+#endif
+ float tap_amount = 1.0-smoothstep(dof_end,dof_begin,tap_depth);
+ tap_amount*=tap_amount*tap_amount; //prevent undesired glow effect
+
+#ifdef DOF_NEAR_FIRST_TAP
+
+ tap_color.a= 1.0-smoothstep(dof_end,dof_begin,tap_depth);
+
+#endif
+
+ max_accum=max(max_accum,tap_amount*ofs_influence);
+
+ color_accum+=tap_color*tap_k;
+
+ }
+
+ color_accum.a=max(color_accum.a,sqrt(max_accum));
+
+
+#ifdef DOF_NEAR_BLUR_MERGE
+
+ vec4 original = textureLod( source_dof_original, uv_interp, 0.0);
+ color_accum = mix(original,color_accum,color_accum.a);
+
+#endif
+
+#ifndef DOF_NEAR_FIRST_TAP
+ //color_accum=vec4(vec3(color_accum.a),1.0);
+#endif
+ frag_color = color_accum;
+
+#endif
+
+
+
+#ifdef GLOW_FIRST_PASS
+
+#ifdef GLOW_USE_AUTO_EXPOSURE
+
+ frag_color/=texelFetch(source_auto_exposure,ivec2(0,0),0).r/auto_exposure_grey;
+#endif
+ frag_color*=exposure;
+
+ float luminance = max(frag_color.r,max(frag_color.g,frag_color.b));
+ float feedback = max( smoothstep(glow_hdr_threshold,glow_hdr_threshold+glow_hdr_scale,luminance), glow_bloom );
+
+ frag_color *= feedback;
+
+#endif
+
+
+#ifdef SIMPLE_COPY
+ vec4 color =textureLod( source_color, uv_interp,0.0);
+ frag_color = color;
+#endif
+
+#ifdef SSAO_MERGE
+
+ vec4 color =textureLod( source_color, uv_interp,0.0);
+ float ssao =textureLod( source_ssao, uv_interp,0.0).r;
+
+ frag_color = vec4( mix(color.rgb,color.rgb*mix(ssao_color.rgb,vec3(1.0),ssao),color.a), 1.0 );
+
+#endif
+
+
+}
diff --git a/drivers/gles2/shaders/exposure.glsl b/drivers/gles2/shaders/exposure.glsl
new file mode 100644
index 0000000000..001b90a0f1
--- /dev/null
+++ b/drivers/gles2/shaders/exposure.glsl
@@ -0,0 +1,98 @@
+[vertex]
+
+
+layout(location=0) in highp vec4 vertex_attrib;
+
+
+void main() {
+
+ gl_Position = vertex_attrib;
+
+}
+
+[fragment]
+
+
+uniform highp sampler2D source_exposure; //texunit:0
+
+#ifdef EXPOSURE_BEGIN
+
+uniform highp ivec2 source_render_size;
+uniform highp ivec2 target_size;
+
+#endif
+
+#ifdef EXPOSURE_END
+
+uniform highp sampler2D prev_exposure; //texunit:1
+uniform highp float exposure_adjust;
+uniform highp float min_luminance;
+uniform highp float max_luminance;
+
+#endif
+
+layout(location = 0) out highp float exposure;
+
+
+
+void main() {
+
+
+
+#ifdef EXPOSURE_BEGIN
+
+
+ ivec2 src_pos = ivec2(gl_FragCoord.xy)*source_render_size/target_size;
+
+#if 1
+ //more precise and expensive, but less jittery
+ ivec2 next_pos = ivec2(gl_FragCoord.xy+ivec2(1))*source_render_size/target_size;
+ next_pos = max(next_pos,src_pos+ivec2(1)); //so it at least reads one pixel
+ highp vec3 source_color=vec3(0.0);
+ for(int i=src_pos.x;i<next_pos.x;i++) {
+ for(int j=src_pos.y;j<next_pos.y;j++) {
+ source_color += texelFetch(source_exposure,ivec2(i,j),0).rgb;
+ }
+ }
+
+ source_color/=float( (next_pos.x-src_pos.x)*(next_pos.y-src_pos.y) );
+#else
+ highp vec3 source_color = texelFetch(source_exposure,src_pos,0).rgb;
+
+#endif
+
+ exposure = max(source_color.r,max(source_color.g,source_color.b));
+
+#else
+
+ ivec2 coord = ivec2(gl_FragCoord.xy);
+ exposure = texelFetch(source_exposure,coord*3+ivec2(0,0),0).r;
+ exposure += texelFetch(source_exposure,coord*3+ivec2(1,0),0).r;
+ exposure += texelFetch(source_exposure,coord*3+ivec2(2,0),0).r;
+ exposure += texelFetch(source_exposure,coord*3+ivec2(0,1),0).r;
+ exposure += texelFetch(source_exposure,coord*3+ivec2(1,1),0).r;
+ exposure += texelFetch(source_exposure,coord*3+ivec2(2,1),0).r;
+ exposure += texelFetch(source_exposure,coord*3+ivec2(0,2),0).r;
+ exposure += texelFetch(source_exposure,coord*3+ivec2(1,2),0).r;
+ exposure += texelFetch(source_exposure,coord*3+ivec2(2,2),0).r;
+ exposure *= (1.0/9.0);
+
+#ifdef EXPOSURE_END
+
+#ifdef EXPOSURE_FORCE_SET
+ //will stay as is
+#else
+ highp float prev_lum = texelFetch(prev_exposure,ivec2(0,0),0).r; //1 pixel previous exposure
+ exposure = clamp( prev_lum + (exposure-prev_lum)*exposure_adjust,min_luminance,max_luminance);
+
+#endif //EXPOSURE_FORCE_SET
+
+
+#endif //EXPOSURE_END
+
+#endif //EXPOSURE_BEGIN
+
+
+}
+
+
diff --git a/drivers/gles2/shaders/particles.glsl b/drivers/gles2/shaders/particles.glsl
new file mode 100644
index 0000000000..a62c124dfe
--- /dev/null
+++ b/drivers/gles2/shaders/particles.glsl
@@ -0,0 +1,260 @@
+[vertex]
+
+
+
+layout(location=0) in highp vec4 color;
+layout(location=1) in highp vec4 velocity_active;
+layout(location=2) in highp vec4 custom;
+layout(location=3) in highp vec4 xform_1;
+layout(location=4) in highp vec4 xform_2;
+layout(location=5) in highp vec4 xform_3;
+
+
+struct Attractor {
+
+ vec3 pos;
+ vec3 dir;
+ float radius;
+ float eat_radius;
+ float strength;
+ float attenuation;
+};
+
+#define MAX_ATTRACTORS 64
+
+uniform bool emitting;
+uniform float system_phase;
+uniform float prev_system_phase;
+uniform int total_particles;
+uniform float explosiveness;
+uniform float randomness;
+uniform float time;
+uniform float delta;
+
+uniform int attractor_count;
+uniform Attractor attractors[MAX_ATTRACTORS];
+uniform bool clear;
+uniform uint cycle;
+uniform float lifetime;
+uniform mat4 emission_transform;
+uniform uint random_seed;
+
+
+out highp vec4 out_color; //tfb:
+out highp vec4 out_velocity_active; //tfb:
+out highp vec4 out_custom; //tfb:
+out highp vec4 out_xform_1; //tfb:
+out highp vec4 out_xform_2; //tfb:
+out highp vec4 out_xform_3; //tfb:
+
+
+#if defined(USE_MATERIAL)
+
+layout(std140) uniform UniformData { //ubo:0
+
+MATERIAL_UNIFORMS
+
+};
+
+#endif
+
+
+VERTEX_SHADER_GLOBALS
+
+uint hash(uint x) {
+
+ x = ((x >> uint(16)) ^ x) * uint(0x45d9f3b);
+ x = ((x >> uint(16)) ^ x) * uint(0x45d9f3b);
+ x = (x >> uint(16)) ^ x;
+ return x;
+}
+
+
+void main() {
+
+#ifdef PARTICLES_COPY
+
+ out_color=color;
+ out_velocity_active=velocity_active;
+ out_custom = custom;
+ out_xform_1 = xform_1;
+ out_xform_2 = xform_2;
+ out_xform_3 = xform_3;
+
+#else
+
+ bool apply_forces=true;
+ bool apply_velocity=true;
+ float local_delta=delta;
+
+ float mass = 1.0;
+
+ float restart_phase = float(gl_VertexID)/float(total_particles);
+
+ if (randomness>0.0) {
+ uint seed = cycle;
+ if (restart_phase >= system_phase) {
+ seed-=uint(1);
+ }
+ seed*=uint(total_particles);
+ seed+=uint(gl_VertexID);
+ float random = float(hash(seed) % uint(65536)) / 65536.0;
+ restart_phase+=randomness * random * 1.0 / float(total_particles);
+ }
+
+ restart_phase*= (1.0-explosiveness);
+ bool restart=false;
+ bool shader_active = velocity_active.a > 0.5;
+
+ if (system_phase > prev_system_phase) {
+ // restart_phase >= prev_system_phase is used so particles emit in the first frame they are processed
+
+ if (restart_phase >= prev_system_phase && restart_phase < system_phase ) {
+ restart=true;
+#ifdef USE_FRACTIONAL_DELTA
+ local_delta = (system_phase - restart_phase) * lifetime;
+#endif
+ }
+
+ } else {
+ if (restart_phase >= prev_system_phase) {
+ restart=true;
+#ifdef USE_FRACTIONAL_DELTA
+ local_delta = (1.0 - restart_phase + system_phase) * lifetime;
+#endif
+ } else if (restart_phase < system_phase ) {
+ restart=true;
+#ifdef USE_FRACTIONAL_DELTA
+ local_delta = (system_phase - restart_phase) * lifetime;
+#endif
+ }
+ }
+
+ uint current_cycle = cycle;
+
+ if (system_phase < restart_phase) {
+ current_cycle-=uint(1);
+ }
+
+ uint particle_number = current_cycle * uint(total_particles) + uint(gl_VertexID);
+ int index = int(gl_VertexID);
+
+ if (restart) {
+ shader_active=emitting;
+ }
+
+ mat4 xform;
+
+#if defined(ENABLE_KEEP_DATA)
+ if (clear) {
+#else
+ if (clear || restart) {
+#endif
+ out_color=vec4(1.0);
+ out_velocity_active=vec4(0.0);
+ out_custom=vec4(0.0);
+ if (!restart)
+ shader_active=false;
+
+ xform = mat4(
+ vec4(1.0,0.0,0.0,0.0),
+ vec4(0.0,1.0,0.0,0.0),
+ vec4(0.0,0.0,1.0,0.0),
+ vec4(0.0,0.0,0.0,1.0)
+ );
+ } else {
+ out_color=color;
+ out_velocity_active=velocity_active;
+ out_custom=custom;
+ xform = transpose(mat4(xform_1,xform_2,xform_3,vec4(vec3(0.0),1.0)));
+ }
+
+ if (shader_active) {
+ //execute shader
+
+ {
+VERTEX_SHADER_CODE
+ }
+
+#if !defined(DISABLE_FORCE)
+
+ if (false) {
+
+ vec3 force = vec3(0.0);
+ for(int i=0;i<attractor_count;i++) {
+
+ vec3 rel_vec = xform[3].xyz - attractors[i].pos;
+ float dist = length(rel_vec);
+ if (attractors[i].radius < dist)
+ continue;
+ if (attractors[i].eat_radius>0.0 && attractors[i].eat_radius > dist) {
+ out_velocity_active.a=0.0;
+ }
+
+ rel_vec = normalize(rel_vec);
+
+ float attenuation = pow(dist / attractors[i].radius,attractors[i].attenuation);
+
+ if (attractors[i].dir==vec3(0.0)) {
+ //towards center
+ force+=attractors[i].strength * rel_vec * attenuation * mass;
+ } else {
+ force+=attractors[i].strength * attractors[i].dir * attenuation *mass;
+
+ }
+ }
+
+ out_velocity_active.xyz += force * local_delta;
+ }
+#endif
+
+#if !defined(DISABLE_VELOCITY)
+
+ if (true) {
+
+ xform[3].xyz += out_velocity_active.xyz * local_delta;
+ }
+#endif
+ } else {
+ xform=mat4(0.0);
+ }
+
+ xform = transpose(xform);
+
+ out_velocity_active.a = mix(0.0,1.0,shader_active);
+
+ out_xform_1 = xform[0];
+ out_xform_2 = xform[1];
+ out_xform_3 = xform[2];
+
+#endif //PARTICLES_COPY
+
+}
+
+[fragment]
+
+//any code here is never executed, stuff is filled just so it works
+
+
+#if defined(USE_MATERIAL)
+
+layout(std140) uniform UniformData {
+
+MATERIAL_UNIFORMS
+
+};
+
+#endif
+
+FRAGMENT_SHADER_GLOBALS
+
+void main() {
+
+ {
+LIGHT_SHADER_CODE
+ }
+
+ {
+FRAGMENT_SHADER_CODE
+ }
+}
diff --git a/drivers/gles2/shaders/resolve.glsl b/drivers/gles2/shaders/resolve.glsl
new file mode 100644
index 0000000000..0b50a9c57b
--- /dev/null
+++ b/drivers/gles2/shaders/resolve.glsl
@@ -0,0 +1,44 @@
+[vertex]
+
+
+layout(location=0) in highp vec4 vertex_attrib;
+layout(location=4) in vec2 uv_in;
+
+out vec2 uv_interp;
+
+
+void main() {
+
+ uv_interp = uv_in;
+ gl_Position = vertex_attrib;
+}
+
+[fragment]
+
+#if !defined(GLES_OVER_GL)
+precision mediump float;
+#endif
+
+in vec2 uv_interp;
+uniform sampler2D source_specular; //texunit:0
+uniform sampler2D source_ssr; //texunit:1
+
+uniform vec2 pixel_size;
+
+in vec2 uv2_interp;
+
+layout(location = 0) out vec4 frag_color;
+
+void main() {
+
+ vec4 specular = texture( source_specular, uv_interp );
+
+#ifdef USE_SSR
+
+ vec4 ssr = textureLod(source_ssr,uv_interp,0.0);
+ specular.rgb = mix(specular.rgb,ssr.rgb*specular.a,ssr.a);
+#endif
+
+ frag_color = vec4(specular.rgb,1.0);
+}
+
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl
new file mode 100644
index 0000000000..79b989be4a
--- /dev/null
+++ b/drivers/gles2/shaders/scene.glsl
@@ -0,0 +1,2113 @@
+[vertex]
+
+#define M_PI 3.14159265359
+
+/*
+from VisualServer:
+
+ARRAY_VERTEX=0,
+ARRAY_NORMAL=1,
+ARRAY_TANGENT=2,
+ARRAY_COLOR=3,
+ARRAY_TEX_UV=4,
+ARRAY_TEX_UV2=5,
+ARRAY_BONES=6,
+ARRAY_WEIGHTS=7,
+ARRAY_INDEX=8,
+*/
+
+//hack to use uv if no uv present so it works with lightmap
+
+
+/* INPUT ATTRIBS */
+
+layout(location=0) in highp vec4 vertex_attrib;
+layout(location=1) in vec3 normal_attrib;
+#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
+layout(location=2) in vec4 tangent_attrib;
+#endif
+
+#if defined(ENABLE_COLOR_INTERP)
+layout(location=3) in vec4 color_attrib;
+#endif
+
+#if defined(ENABLE_UV_INTERP)
+layout(location=4) in vec2 uv_attrib;
+#endif
+
+#if defined(ENABLE_UV2_INTERP)
+layout(location=5) in vec2 uv2_attrib;
+#endif
+
+uniform float normal_mult;
+
+#ifdef USE_SKELETON
+layout(location=6) in ivec4 bone_indices; // attrib:6
+layout(location=7) in vec4 bone_weights; // attrib:7
+#endif
+
+#ifdef USE_INSTANCING
+
+layout(location=8) in highp vec4 instance_xform0;
+layout(location=9) in highp vec4 instance_xform1;
+layout(location=10) in highp vec4 instance_xform2;
+layout(location=11) in lowp vec4 instance_color;
+
+#if defined(ENABLE_INSTANCE_CUSTOM)
+layout(location=12) in highp vec4 instance_custom_data;
+#endif
+
+#endif
+
+layout(std140) uniform SceneData { //ubo:0
+
+ highp mat4 projection_matrix;
+ highp mat4 inv_projection_matrix;
+ highp mat4 camera_inverse_matrix;
+ highp mat4 camera_matrix;
+
+ mediump vec4 ambient_light_color;
+ mediump vec4 bg_color;
+
+ mediump vec4 fog_color_enabled;
+ mediump vec4 fog_sun_color_amount;
+
+ mediump float ambient_energy;
+ mediump float bg_energy;
+
+ mediump float z_offset;
+ mediump float z_slope_scale;
+ highp float shadow_dual_paraboloid_render_zfar;
+ highp float shadow_dual_paraboloid_render_side;
+
+ highp vec2 viewport_size;
+ highp vec2 screen_pixel_size;
+ highp vec2 shadow_atlas_pixel_size;
+ highp vec2 directional_shadow_pixel_size;
+
+ highp float time;
+ highp float z_far;
+ mediump float reflection_multiplier;
+ mediump float subsurface_scatter_width;
+ mediump float ambient_occlusion_affect_light;
+
+ bool fog_depth_enabled;
+ highp float fog_depth_begin;
+ highp float fog_depth_curve;
+ bool fog_transmit_enabled;
+ highp float fog_transmit_curve;
+ bool fog_height_enabled;
+ highp float fog_height_min;
+ highp float fog_height_max;
+ highp float fog_height_curve;
+
+};
+
+uniform highp mat4 world_transform;
+
+
+#ifdef USE_LIGHT_DIRECTIONAL
+
+layout(std140) uniform DirectionalLightData { //ubo:3
+
+ highp vec4 light_pos_inv_radius;
+ mediump vec4 light_direction_attenuation;
+ mediump vec4 light_color_energy;
+ mediump vec4 light_params; //cone attenuation, angle, specular, shadow enabled,
+ mediump vec4 light_clamp;
+ mediump vec4 shadow_color_contact;
+ highp mat4 shadow_matrix1;
+ highp mat4 shadow_matrix2;
+ highp mat4 shadow_matrix3;
+ highp mat4 shadow_matrix4;
+ mediump vec4 shadow_split_offsets;
+};
+
+#endif
+
+#ifdef USE_VERTEX_LIGHTING
+//omni and spot
+
+struct LightData {
+
+ highp vec4 light_pos_inv_radius;
+ mediump vec4 light_direction_attenuation;
+ mediump vec4 light_color_energy;
+ mediump vec4 light_params; //cone attenuation, angle, specular, shadow enabled,
+ mediump vec4 light_clamp;
+ mediump vec4 shadow_color_contact;
+ highp mat4 shadow_matrix;
+
+};
+
+
+layout(std140) uniform OmniLightData { //ubo:4
+
+ LightData omni_lights[MAX_LIGHT_DATA_STRUCTS];
+};
+
+layout(std140) uniform SpotLightData { //ubo:5
+
+ LightData spot_lights[MAX_LIGHT_DATA_STRUCTS];
+};
+
+#ifdef USE_FORWARD_LIGHTING
+
+
+uniform int omni_light_indices[MAX_FORWARD_LIGHTS];
+uniform int omni_light_count;
+
+uniform int spot_light_indices[MAX_FORWARD_LIGHTS];
+uniform int spot_light_count;
+
+#endif
+
+out vec4 diffuse_light_interp;
+out vec4 specular_light_interp;
+
+void light_compute(vec3 N, vec3 L,vec3 V, vec3 light_color, float roughness, inout vec3 diffuse, inout vec3 specular) {
+
+ float dotNL = max(dot(N,L), 0.0 );
+ diffuse += dotNL * light_color / M_PI;
+
+ if (roughness > 0.0) {
+
+ vec3 H = normalize(V + L);
+ float dotNH = max(dot(N,H), 0.0 );
+ float intensity = pow( dotNH, (1.0-roughness) * 256.0);
+ specular += light_color * intensity;
+
+ }
+}
+
+void light_process_omni(int idx, vec3 vertex, vec3 eye_vec,vec3 normal, float roughness,inout vec3 diffuse, inout vec3 specular) {
+
+ vec3 light_rel_vec = omni_lights[idx].light_pos_inv_radius.xyz-vertex;
+ float light_length = length( light_rel_vec );
+ float normalized_distance = light_length*omni_lights[idx].light_pos_inv_radius.w;
+ vec3 light_attenuation = vec3(pow( max(1.0 - normalized_distance, 0.0), omni_lights[idx].light_direction_attenuation.w ));
+
+ light_compute(normal,normalize(light_rel_vec),eye_vec,omni_lights[idx].light_color_energy.rgb * light_attenuation,roughness,diffuse,specular);
+
+}
+
+void light_process_spot(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, float roughness, inout vec3 diffuse, inout vec3 specular) {
+
+ vec3 light_rel_vec = spot_lights[idx].light_pos_inv_radius.xyz-vertex;
+ float light_length = length( light_rel_vec );
+ float normalized_distance = light_length*spot_lights[idx].light_pos_inv_radius.w;
+ vec3 light_attenuation = vec3(pow( max(1.0 - normalized_distance, 0.001), spot_lights[idx].light_direction_attenuation.w ));
+ vec3 spot_dir = spot_lights[idx].light_direction_attenuation.xyz;
+ float spot_cutoff=spot_lights[idx].light_params.y;
+ float scos = max(dot(-normalize(light_rel_vec), spot_dir),spot_cutoff);
+ float spot_rim = (1.0 - scos) / (1.0 - spot_cutoff);
+ light_attenuation *= 1.0 - pow( max(spot_rim,0.001), spot_lights[idx].light_params.x);
+
+
+ light_compute(normal,normalize(light_rel_vec),eye_vec,spot_lights[idx].light_color_energy.rgb*light_attenuation,roughness,diffuse,specular);
+}
+
+
+#endif
+
+/* Varyings */
+
+out highp vec3 vertex_interp;
+out vec3 normal_interp;
+
+#if defined(ENABLE_COLOR_INTERP)
+out vec4 color_interp;
+#endif
+
+#if defined(ENABLE_UV_INTERP)
+out vec2 uv_interp;
+#endif
+
+#if defined(ENABLE_UV2_INTERP)
+out vec2 uv2_interp;
+#endif
+
+
+#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
+out vec3 tangent_interp;
+out vec3 binormal_interp;
+#endif
+
+
+
+
+
+#if defined(USE_MATERIAL)
+
+layout(std140) uniform UniformData { //ubo:1
+
+MATERIAL_UNIFORMS
+
+};
+
+#endif
+
+VERTEX_SHADER_GLOBALS
+
+#ifdef RENDER_DEPTH_DUAL_PARABOLOID
+
+out highp float dp_clip;
+
+#endif
+
+#define SKELETON_TEXTURE_WIDTH 256
+
+#ifdef USE_SKELETON
+uniform highp sampler2D skeleton_texture; //texunit:-1
+#endif
+
+out highp vec4 position_interp;
+
+// FIXME: This triggers a Mesa bug that breaks rendering, so disabled for now.
+// See GH-13450 and https://bugs.freedesktop.org/show_bug.cgi?id=100316
+//invariant gl_Position;
+
+void main() {
+
+ highp vec4 vertex = vertex_attrib; // vec4(vertex_attrib.xyz * data_attrib.x,1.0);
+
+ mat4 world_matrix = world_transform;
+
+
+#ifdef USE_INSTANCING
+
+ {
+ highp mat4 m=mat4(instance_xform0,instance_xform1,instance_xform2,vec4(0.0,0.0,0.0,1.0));
+ world_matrix = world_matrix * transpose(m);
+ }
+#endif
+
+ vec3 normal = normal_attrib * normal_mult;
+
+
+#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
+ vec3 tangent = tangent_attrib.xyz;
+ tangent*=normal_mult;
+ float binormalf = tangent_attrib.a;
+#endif
+
+#if defined(ENABLE_COLOR_INTERP)
+ color_interp = color_attrib;
+#if defined(USE_INSTANCING)
+ color_interp *= instance_color;
+#endif
+
+#endif
+
+#ifdef USE_SKELETON
+ {
+ //skeleton transform
+ ivec2 tex_ofs = ivec2( bone_indices.x%256, (bone_indices.x/256)*3 );
+ highp mat3x4 m = mat3x4(
+ texelFetch(skeleton_texture,tex_ofs,0),
+ texelFetch(skeleton_texture,tex_ofs+ivec2(0,1),0),
+ texelFetch(skeleton_texture,tex_ofs+ivec2(0,2),0)
+ ) * bone_weights.x;
+
+ tex_ofs = ivec2( bone_indices.y%256, (bone_indices.y/256)*3 );
+
+ m+= mat3x4(
+ texelFetch(skeleton_texture,tex_ofs,0),
+ texelFetch(skeleton_texture,tex_ofs+ivec2(0,1),0),
+ texelFetch(skeleton_texture,tex_ofs+ivec2(0,2),0)
+ ) * bone_weights.y;
+
+ tex_ofs = ivec2( bone_indices.z%256, (bone_indices.z/256)*3 );
+
+ m+= mat3x4(
+ texelFetch(skeleton_texture,tex_ofs,0),
+ texelFetch(skeleton_texture,tex_ofs+ivec2(0,1),0),
+ texelFetch(skeleton_texture,tex_ofs+ivec2(0,2),0)
+ ) * bone_weights.z;
+
+
+ tex_ofs = ivec2( bone_indices.w%256, (bone_indices.w/256)*3 );
+
+ m+= mat3x4(
+ texelFetch(skeleton_texture,tex_ofs,0),
+ texelFetch(skeleton_texture,tex_ofs+ivec2(0,1),0),
+ texelFetch(skeleton_texture,tex_ofs+ivec2(0,2),0)
+ ) * bone_weights.w;
+
+
+ vertex.xyz = vertex * m;
+
+ normal = vec4(normal,0.0) * m;
+#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
+ tangent.xyz = vec4(tangent.xyz,0.0) * m;
+#endif
+ }
+#endif
+
+
+#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
+
+ vec3 binormal = normalize( cross(normal,tangent) * binormalf );
+#endif
+
+#if defined(ENABLE_UV_INTERP)
+ uv_interp = uv_attrib;
+#endif
+
+#if defined(ENABLE_UV2_INTERP)
+ uv2_interp = uv2_attrib;
+#endif
+
+#if defined(USE_INSTANCING) && defined(ENABLE_INSTANCE_CUSTOM)
+ vec4 instance_custom = instance_custom_data;
+#else
+ vec4 instance_custom = vec4(0.0);
+#endif
+
+ highp mat4 modelview = camera_inverse_matrix * world_matrix;
+ highp mat4 local_projection = projection_matrix;
+
+//using world coordinates
+#if !defined(SKIP_TRANSFORM_USED) && defined(VERTEX_WORLD_COORDS_USED)
+
+ vertex = world_matrix * vertex;
+ normal = normalize((world_matrix * vec4(normal,0.0)).xyz);
+
+#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
+
+ tangent = normalize((world_matrix * vec4(tangent,0.0)).xyz);
+ binormal = normalize((world_matrix * vec4(binormal,0.0)).xyz);
+#endif
+#endif
+
+ float roughness=0.0;
+
+//defines that make writing custom shaders easier
+#define projection_matrix local_projection
+#define world_transform world_matrix
+{
+
+VERTEX_SHADER_CODE
+
+}
+
+
+
+//using local coordinates (default)
+#if !defined(SKIP_TRANSFORM_USED) && !defined(VERTEX_WORLD_COORDS_USED)
+
+ vertex = modelview * vertex;
+ normal = normalize((modelview * vec4(normal,0.0)).xyz);
+
+#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
+
+ tangent = normalize((modelview * vec4(tangent,0.0)).xyz);
+ binormal = normalize((modelview * vec4(binormal,0.0)).xyz);
+#endif
+#endif
+
+//using world coordinates
+#if !defined(SKIP_TRANSFORM_USED) && defined(VERTEX_WORLD_COORDS_USED)
+
+ vertex = camera_inverse_matrix * vertex;
+ normal = normalize((camera_inverse_matrix * vec4(normal,0.0)).xyz);
+
+#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
+
+ tangent = normalize((camera_inverse_matrix * vec4(tangent,0.0)).xyz);
+ binormal = normalize((camera_inverse_matrix * vec4(binormal,0.0)).xyz);
+#endif
+#endif
+
+ vertex_interp = vertex.xyz;
+ normal_interp = normal;
+
+
+#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
+ tangent_interp = tangent;
+ binormal_interp = binormal;
+#endif
+
+
+#ifdef RENDER_DEPTH
+
+
+#ifdef RENDER_DEPTH_DUAL_PARABOLOID
+
+ vertex_interp.z*= shadow_dual_paraboloid_render_side;
+ normal_interp.z*= shadow_dual_paraboloid_render_side;
+
+ dp_clip=vertex_interp.z; //this attempts to avoid noise caused by objects sent to the other parabolloid side due to bias
+
+ //for dual paraboloid shadow mapping, this is the fastest but least correct way, as it curves straight edges
+
+ highp vec3 vtx = vertex_interp+normalize(vertex_interp)*z_offset;
+ highp float distance = length(vtx);
+ vtx = normalize(vtx);
+ vtx.xy/=1.0-vtx.z;
+ vtx.z=(distance/shadow_dual_paraboloid_render_zfar);
+ vtx.z=vtx.z * 2.0 - 1.0;
+
+ vertex.xyz=vtx;
+ vertex.w=1.0;
+
+
+#else
+
+ float z_ofs = z_offset;
+ z_ofs += (1.0-abs(normal_interp.z))*z_slope_scale;
+ vertex_interp.z-=z_ofs;
+
+#endif //RENDER_DEPTH_DUAL_PARABOLOID
+
+#endif //RENDER_DEPTH
+
+ gl_Position = projection_matrix * vec4(vertex_interp,1.0);
+
+ position_interp=gl_Position;
+
+#ifdef USE_VERTEX_LIGHTING
+
+ diffuse_light_interp=vec4(0.0);
+ specular_light_interp=vec4(0.0);
+
+#ifdef USE_FORWARD_LIGHTING
+
+ for(int i=0;i<omni_light_count;i++) {
+ light_process_omni(omni_light_indices[i],vertex_interp,-normalize( vertex_interp ),normal_interp,roughness,diffuse_light_interp.rgb,specular_light_interp.rgb);
+ }
+
+ for(int i=0;i<spot_light_count;i++) {
+ light_process_spot(spot_light_indices[i],vertex_interp,-normalize( vertex_interp ),normal_interp,roughness,diffuse_light_interp.rgb,specular_light_interp.rgb);
+ }
+#endif
+
+#ifdef USE_LIGHT_DIRECTIONAL
+
+ vec3 directional_diffuse = vec3(0.0);
+ vec3 directional_specular = vec3(0.0);
+ light_compute(normal_interp,-light_direction_attenuation.xyz,-normalize( vertex_interp ),light_color_energy.rgb,roughness,directional_diffuse,directional_specular);
+
+ float diff_avg = dot(diffuse_light_interp.rgb,vec3(0.33333));
+ float diff_dir_avg = dot(directional_diffuse,vec3(0.33333));
+ if (diff_avg>0.0) {
+ diffuse_light_interp.a=diff_dir_avg/(diff_avg+diff_dir_avg);
+ } else {
+ diffuse_light_interp.a=1.0;
+ }
+
+ diffuse_light_interp.rgb+=directional_diffuse;
+
+ float spec_avg = dot(specular_light_interp.rgb,vec3(0.33333));
+ float spec_dir_avg = dot(directional_specular,vec3(0.33333));
+ if (spec_avg>0.0) {
+ specular_light_interp.a=spec_dir_avg/(spec_avg+spec_dir_avg);
+ } else {
+ specular_light_interp.a=1.0;
+ }
+
+ specular_light_interp.rgb+=directional_specular;
+
+#endif //USE_LIGHT_DIRECTIONAL
+
+
+#endif // USE_VERTEX_LIGHTING
+
+}
+
+
+[fragment]
+
+/* texture unit usage, N is max_texture_unity-N
+
+1-skeleton
+2-radiance
+3-reflection_atlas
+4-directional_shadow
+5-shadow_atlas
+6-decal_atlas
+7-screen
+8-depth
+9-probe1
+10-probe2
+
+*/
+
+uniform highp mat4 world_transform;
+
+#define M_PI 3.14159265359
+
+/* Varyings */
+
+#if defined(ENABLE_COLOR_INTERP)
+in vec4 color_interp;
+#endif
+
+#if defined(ENABLE_UV_INTERP)
+in vec2 uv_interp;
+#endif
+
+#if defined(ENABLE_UV2_INTERP)
+in vec2 uv2_interp;
+#endif
+
+#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
+in vec3 tangent_interp;
+in vec3 binormal_interp;
+#endif
+
+in highp vec3 vertex_interp;
+in vec3 normal_interp;
+
+
+/* PBR CHANNELS */
+
+//used on forward mainly
+uniform bool no_ambient_light;
+
+
+
+#ifdef USE_RADIANCE_MAP
+
+
+
+layout(std140) uniform Radiance { //ubo:2
+
+ mat4 radiance_inverse_xform;
+ float radiance_ambient_contribution;
+
+};
+
+#define RADIANCE_MAX_LOD 5.0
+
+#ifdef USE_RADIANCE_MAP_ARRAY
+
+uniform sampler2DArray radiance_map; //texunit:-2
+
+vec3 textureDualParaboloid(sampler2DArray p_tex, vec3 p_vec,float p_roughness) {
+
+ vec3 norm = normalize(p_vec);
+ norm.xy/=1.0+abs(norm.z);
+ norm.xy=norm.xy * vec2(0.5,0.25) + vec2(0.5,0.25);
+
+ // we need to lie the derivatives (normg) and assume that DP side is always the same
+ // to get proper texture filtering
+ vec2 normg=norm.xy;
+ if (norm.z>0.0) {
+ norm.y=0.5-norm.y+0.5;
+ }
+
+ // thanks to OpenGL spec using floor(layer + 0.5) for texture arrays,
+ // it's easy to have precision errors using fract() to interpolate layers
+ // as such, using fixed point to ensure it works.
+
+ float index = p_roughness * RADIANCE_MAX_LOD;
+ int indexi = int(index * 256.0);
+ vec3 base = textureGrad(p_tex, vec3(norm.xy, float(indexi/256)),dFdx(normg),dFdy(normg)).xyz;
+ vec3 next = textureGrad(p_tex, vec3(norm.xy, float(indexi/256+1)),dFdx(normg),dFdy(normg)).xyz;
+ return mix(base,next,float(indexi%256)/256.0);
+}
+
+#else
+
+uniform sampler2D radiance_map; //texunit:-2
+
+vec3 textureDualParaboloid(sampler2D p_tex, vec3 p_vec,float p_roughness) {
+
+ vec3 norm = normalize(p_vec);
+ norm.xy/=1.0+abs(norm.z);
+ norm.xy=norm.xy * vec2(0.5,0.25) + vec2(0.5,0.25);
+ if (norm.z>0.0) {
+ norm.y=0.5-norm.y+0.5;
+ }
+ return textureLod(p_tex, norm.xy, p_roughness * RADIANCE_MAX_LOD).xyz;
+}
+
+#endif
+
+#endif
+
+/* Material Uniforms */
+
+
+
+#if defined(USE_MATERIAL)
+
+layout(std140) uniform UniformData {
+
+MATERIAL_UNIFORMS
+
+};
+
+#endif
+
+FRAGMENT_SHADER_GLOBALS
+
+layout(std140) uniform SceneData {
+
+ highp mat4 projection_matrix;
+ highp mat4 inv_projection_matrix;
+ highp mat4 camera_inverse_matrix;
+ highp mat4 camera_matrix;
+
+ mediump vec4 ambient_light_color;
+ mediump vec4 bg_color;
+
+ mediump vec4 fog_color_enabled;
+ mediump vec4 fog_sun_color_amount;
+
+ mediump float ambient_energy;
+ mediump float bg_energy;
+
+ mediump float z_offset;
+ mediump float z_slope_scale;
+ highp float shadow_dual_paraboloid_render_zfar;
+ highp float shadow_dual_paraboloid_render_side;
+
+ highp vec2 viewport_size;
+ highp vec2 screen_pixel_size;
+ highp vec2 shadow_atlas_pixel_size;
+ highp vec2 directional_shadow_pixel_size;
+
+ highp float time;
+ highp float z_far;
+ mediump float reflection_multiplier;
+ mediump float subsurface_scatter_width;
+ mediump float ambient_occlusion_affect_light;
+
+ bool fog_depth_enabled;
+ highp float fog_depth_begin;
+ highp float fog_depth_curve;
+ bool fog_transmit_enabled;
+ highp float fog_transmit_curve;
+ bool fog_height_enabled;
+ highp float fog_height_min;
+ highp float fog_height_max;
+ highp float fog_height_curve;
+};
+
+//directional light data
+
+#ifdef USE_LIGHT_DIRECTIONAL
+
+layout(std140) uniform DirectionalLightData {
+
+ highp vec4 light_pos_inv_radius;
+ mediump vec4 light_direction_attenuation;
+ mediump vec4 light_color_energy;
+ mediump vec4 light_params; //cone attenuation, angle, specular, shadow enabled,
+ mediump vec4 light_clamp;
+ mediump vec4 shadow_color_contact;
+ highp mat4 shadow_matrix1;
+ highp mat4 shadow_matrix2;
+ highp mat4 shadow_matrix3;
+ highp mat4 shadow_matrix4;
+ mediump vec4 shadow_split_offsets;
+};
+
+
+uniform highp sampler2DShadow directional_shadow; //texunit:-4
+
+#endif
+
+#ifdef USE_VERTEX_LIGHTING
+in vec4 diffuse_light_interp;
+in vec4 specular_light_interp;
+#endif
+//omni and spot
+
+struct LightData {
+
+ highp vec4 light_pos_inv_radius;
+ mediump vec4 light_direction_attenuation;
+ mediump vec4 light_color_energy;
+ mediump vec4 light_params; //cone attenuation, angle, specular, shadow enabled,
+ mediump vec4 light_clamp;
+ mediump vec4 shadow_color_contact;
+ highp mat4 shadow_matrix;
+
+};
+
+
+layout(std140) uniform OmniLightData { //ubo:4
+
+ LightData omni_lights[MAX_LIGHT_DATA_STRUCTS];
+};
+
+layout(std140) uniform SpotLightData { //ubo:5
+
+ LightData spot_lights[MAX_LIGHT_DATA_STRUCTS];
+};
+
+
+uniform highp sampler2DShadow shadow_atlas; //texunit:-5
+
+
+struct ReflectionData {
+
+ mediump vec4 box_extents;
+ mediump vec4 box_offset;
+ mediump vec4 params; // intensity, 0, interior , boxproject
+ mediump vec4 ambient; //ambient color, energy
+ mediump vec4 atlas_clamp;
+ 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
+};
+
+layout(std140) uniform ReflectionProbeData { //ubo:6
+
+ ReflectionData reflections[MAX_REFLECTION_DATA_STRUCTS];
+};
+uniform mediump sampler2D reflection_atlas; //texunit:-3
+
+
+#ifdef USE_FORWARD_LIGHTING
+
+uniform int omni_light_indices[MAX_FORWARD_LIGHTS];
+uniform int omni_light_count;
+
+uniform int spot_light_indices[MAX_FORWARD_LIGHTS];
+uniform int spot_light_count;
+
+uniform int reflection_indices[MAX_FORWARD_LIGHTS];
+uniform int reflection_count;
+
+#endif
+
+
+#if defined(SCREEN_TEXTURE_USED)
+
+uniform highp sampler2D screen_texture; //texunit:-7
+
+#endif
+
+#ifdef USE_MULTIPLE_RENDER_TARGETS
+
+layout(location=0) out vec4 diffuse_buffer;
+layout(location=1) out vec4 specular_buffer;
+layout(location=2) out vec4 normal_mr_buffer;
+#if defined(ENABLE_SSS)
+layout(location=3) out float sss_buffer;
+#endif
+
+#else
+
+layout(location=0) out vec4 frag_color;
+
+#endif
+
+in highp vec4 position_interp;
+uniform highp sampler2D depth_buffer; //texunit:-8
+
+#ifdef USE_CONTACT_SHADOWS
+
+float contact_shadow_compute(vec3 pos, vec3 dir, float max_distance) {
+
+ if (abs(dir.z)>0.99)
+ return 1.0;
+
+ vec3 endpoint = pos+dir*max_distance;
+ vec4 source = position_interp;
+ vec4 dest = projection_matrix * vec4(endpoint, 1.0);
+
+ vec2 from_screen = (source.xy / source.w) * 0.5 + 0.5;
+ vec2 to_screen = (dest.xy / dest.w) * 0.5 + 0.5;
+
+ vec2 screen_rel = to_screen - from_screen;
+
+ if (length(screen_rel)<0.00001)
+ return 1.0; //too small, don't do anything
+
+ /*float pixel_size; //approximate pixel size
+
+ if (screen_rel.x > screen_rel.y) {
+
+ pixel_size = abs((pos.x-endpoint.x)/(screen_rel.x/screen_pixel_size.x));
+ } else {
+ pixel_size = abs((pos.y-endpoint.y)/(screen_rel.y/screen_pixel_size.y));
+
+ }*/
+ vec4 bias = projection_matrix * vec4(pos+vec3(0.0,0.0,0.04), 1.0); //todo un-harcode the 0.04
+
+
+
+ vec2 pixel_incr = normalize(screen_rel)*screen_pixel_size;
+
+
+ float steps = length(screen_rel) / length(pixel_incr);
+ steps = min(2000.0,steps); //put a limit to avoid freezing in some strange situation
+ //steps=10.0;
+
+ vec4 incr = (dest - source)/steps;
+ float ratio=0.0;
+ float ratio_incr = 1.0/steps;
+
+ while(steps>0.0) {
+ source += incr*2.0;
+ bias+=incr*2.0;
+
+ vec3 uv_depth = (source.xyz / source.w) * 0.5 + 0.5;
+ float depth = texture(depth_buffer,uv_depth.xy).r;
+
+ if (depth < uv_depth.z) {
+ if (depth > (bias.z/bias.w) * 0.5 + 0.5) {
+ return min(pow(ratio,4.0),1.0);
+ } else {
+ return 1.0;
+ }
+ }
+
+
+ ratio+=ratio_incr;
+ steps-=1.0;
+ }
+
+ return 1.0;
+}
+
+#endif
+
+
+// This returns the G_GGX function divided by 2 cos_theta_m, where in practice cos_theta_m is either N.L or N.V.
+// We're dividing this factor off because the overall term we'll end up looks like
+// (see, for example, the first unnumbered equation in B. Burley, "Physically Based Shading at Disney", SIGGRAPH 2012):
+//
+// F(L.V) D(N.H) G(N.L) G(N.V) / (4 N.L N.V)
+//
+// We're basically regouping this as
+//
+// F(L.V) D(N.H) [G(N.L)/(2 N.L)] [G(N.V) / (2 N.V)]
+//
+// and thus, this function implements the [G(N.m)/(2 N.m)] part with m = L or V.
+//
+// The contents of the D and G (G1) functions (GGX) are taken from
+// E. Heitz, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs", J. Comp. Graph. Tech. 3 (2) (2014).
+// Eqns 71-72 and 85-86 (see also Eqns 43 and 80).
+
+float G_GGX_2cos(float cos_theta_m, float alpha) {
+ // Schlick's approximation
+ // C. Schlick, "An Inexpensive BRDF Model for Physically-based Rendering", Computer Graphics Forum. 13 (3): 233 (1994)
+ // Eq. (19), although see Heitz (2014) the about the problems with his derivation.
+ // It nevertheless approximates GGX well with k = alpha/2.
+ float k = 0.5*alpha;
+ return 0.5 / (cos_theta_m * (1.0 - k) + k);
+
+ // float cos2 = cos_theta_m*cos_theta_m;
+ // float sin2 = (1.0-cos2);
+ // return 1.0 /( cos_theta_m + sqrt(cos2 + alpha*alpha*sin2) );
+}
+
+float D_GGX(float cos_theta_m, float alpha) {
+ float alpha2 = alpha*alpha;
+ float d = 1.0 + (alpha2-1.0)*cos_theta_m*cos_theta_m;
+ return alpha2/(M_PI * d * d);
+}
+
+float G_GGX_anisotropic_2cos(float cos_theta_m, float alpha_x, float alpha_y, float cos_phi, float sin_phi) {
+ float cos2 = cos_theta_m * cos_theta_m;
+ float sin2 = (1.0-cos2);
+ float s_x = alpha_x * cos_phi;
+ float s_y = alpha_y * sin_phi;
+ return 1.0 / (cos_theta_m + sqrt(cos2 + (s_x*s_x + s_y*s_y)*sin2 ));
+}
+
+float D_GGX_anisotropic(float cos_theta_m, float alpha_x, float alpha_y, float cos_phi, float sin_phi) {
+ float cos2 = cos_theta_m * cos_theta_m;
+ float sin2 = (1.0-cos2);
+ float r_x = cos_phi/alpha_x;
+ float r_y = sin_phi/alpha_y;
+ float d = cos2 + sin2*(r_x * r_x + r_y * r_y);
+ return 1.0 / (M_PI * alpha_x * alpha_y * d * d );
+}
+
+
+float SchlickFresnel(float u)
+{
+ float m = 1.0-u;
+ float m2 = m*m;
+ return m2*m2*m; // pow(m,5)
+}
+
+float GTR1(float NdotH, float a)
+{
+ if (a >= 1.0) return 1.0/M_PI;
+ float a2 = a*a;
+ float t = 1.0 + (a2-1.0)*NdotH*NdotH;
+ return (a2-1.0) / (M_PI*log(a2)*t);
+}
+
+vec3 metallic_to_specular_color(float metallic, float specular, vec3 albedo) {
+ float dielectric = (0.034 * 2.0) * specular;
+ // energy conservation
+ return mix(vec3(dielectric), albedo, metallic); // TODO: reference?
+}
+
+void light_compute(vec3 N, vec3 L, vec3 V, vec3 B, vec3 T, vec3 light_color, vec3 attenuation, vec3 diffuse_color, vec3 transmission, float specular_blob_intensity, float roughness, float metallic, float rim, float rim_tint, float clearcoat, float clearcoat_gloss, float anisotropy, inout vec3 diffuse_light, inout vec3 specular_light) {
+
+#if defined(USE_LIGHT_SHADER_CODE)
+//light is written by the light shader
+
+ vec3 normal = N;
+ vec3 albedo = diffuse_color;
+ vec3 light = L;
+ vec3 view = V;
+
+LIGHT_SHADER_CODE
+
+
+#else
+ float NdotL = dot(N,L);
+ float cNdotL = max(NdotL, 0.0); // clamped NdotL
+ float NdotV = dot(N, V);
+ float cNdotV = max(NdotV, 0.0);
+
+ if (metallic < 1.0) {
+#if defined(DIFFUSE_OREN_NAYAR)
+ vec3 diffuse_brdf_NL;
+#else
+ float diffuse_brdf_NL; // BRDF times N.L for calculating diffuse radiance
+#endif
+
+
+#if defined(DIFFUSE_LAMBERT_WRAP)
+ //energy conserving lambert wrap shader
+ diffuse_brdf_NL = max(0.0,(NdotL + roughness) / ((1.0 + roughness) * (1.0 + roughness)));
+
+#elif defined(DIFFUSE_OREN_NAYAR)
+
+ {
+ // see http://mimosa-pudica.net/improved-oren-nayar.html
+ float LdotV = dot(L, V);
+
+
+ float s = LdotV - NdotL * NdotV;
+ float t = mix(1.0, max(NdotL, NdotV), step(0.0, s));
+
+ float sigma2 = roughness * roughness; // TODO: this needs checking
+ vec3 A = 1.0 + sigma2 * (- 0.5 / (sigma2 + 0.33) + 0.17*diffuse_color / (sigma2 + 0.13) );
+ float B = 0.45 * sigma2 / (sigma2 + 0.09);
+
+ diffuse_brdf_NL = cNdotL * (A + vec3(B) * s / t) * (1.0 / M_PI);
+ }
+
+#elif defined(DIFFUSE_TOON)
+
+ diffuse_brdf_NL = smoothstep(-roughness,max(roughness,0.01),NdotL);
+
+#elif defined(DIFFUSE_BURLEY)
+
+ {
+
+
+ vec3 H = normalize(V + L);
+ float cLdotH = max(0.0,dot(L, H));
+
+ float FD90 = 0.5 + 2.0 * cLdotH * cLdotH * roughness;
+ float FdV = 1.0 + (FD90 - 1.0) * SchlickFresnel(cNdotV);
+ float FdL = 1.0 + (FD90 - 1.0) * SchlickFresnel(cNdotL);
+ diffuse_brdf_NL = (1.0 / M_PI) * FdV * FdL * cNdotL;
+ /*
+ float energyBias = mix(roughness, 0.0, 0.5);
+ float energyFactor = mix(roughness, 1.0, 1.0 / 1.51);
+ float fd90 = energyBias + 2.0 * VoH * VoH * roughness;
+ float f0 = 1.0;
+ float lightScatter = f0 + (fd90 - f0) * pow(1.0 - cNdotL, 5.0);
+ float viewScatter = f0 + (fd90 - f0) * pow(1.0 - cNdotV, 5.0);
+
+ diffuse_brdf_NL = lightScatter * viewScatter * energyFactor;*/
+ }
+#else
+ //lambert
+ diffuse_brdf_NL = cNdotL * (1.0 / M_PI);
+#endif
+
+#if defined(TRANSMISSION_USED)
+ diffuse_light += light_color * diffuse_color * mix(vec3(diffuse_brdf_NL), vec3(M_PI), transmission) * attenuation;
+#else
+ diffuse_light += light_color * diffuse_color * diffuse_brdf_NL * attenuation;
+#endif
+
+
+
+#if defined(LIGHT_USE_RIM)
+ float rim_light = pow(1.0-cNdotV, (1.0-roughness)*16.0);
+ diffuse_light += rim_light * rim * mix(vec3(1.0),diffuse_color,rim_tint) * light_color;
+#endif
+ }
+
+
+ if (roughness > 0.0) { // FIXME: roughness == 0 should not disable specular light entirely
+
+
+ // D
+
+#if defined(SPECULAR_BLINN)
+
+ vec3 H = normalize(V + L);
+ float cNdotH = max(dot(N,H), 0.0 );
+ float intensity = pow( cNdotH, (1.0-roughness) * 256.0);
+ specular_light += light_color * intensity * specular_blob_intensity * attenuation;
+
+#elif defined(SPECULAR_PHONG)
+
+ vec3 R = normalize(-reflect(L,N));
+ float cRdotV = max(0.0,dot(R,V));
+ float intensity = pow( cRdotV, (1.0-roughness) * 256.0);
+ specular_light += light_color * intensity * specular_blob_intensity * attenuation;
+
+#elif defined(SPECULAR_TOON)
+
+ vec3 R = normalize(-reflect(L,N));
+ float RdotV = dot(R,V);
+ float mid = 1.0-roughness;
+ mid*=mid;
+ float intensity = smoothstep(mid-roughness*0.5, mid+roughness*0.5, RdotV) * mid;
+ diffuse_light += light_color * intensity * specular_blob_intensity * attenuation; // write to diffuse_light, as in toon shading you generally want no reflection
+
+#elif defined(SPECULAR_DISABLED)
+ //none..
+
+#elif defined(SPECULAR_SCHLICK_GGX)
+ // shlick+ggx as default
+
+ vec3 H = normalize(V + L);
+
+ float cNdotH = max(dot(N,H), 0.0);
+ float cLdotH = max(dot(L,H), 0.0);
+
+# if defined(LIGHT_USE_ANISOTROPY)
+
+ float aspect = sqrt(1.0-anisotropy*0.9);
+ float rx = roughness/aspect;
+ float ry = roughness*aspect;
+ float ax = rx*rx;
+ float ay = ry*ry;
+ float XdotH = dot( T, H );
+ float YdotH = dot( B, H );
+ float D = D_GGX_anisotropic(cNdotH, ax, ay, XdotH, YdotH);
+ float G = G_GGX_anisotropic_2cos(cNdotL, ax, ay, XdotH, YdotH) * G_GGX_anisotropic_2cos(cNdotV, ax, ay, XdotH, YdotH);
+
+# else
+ float alpha = roughness * roughness;
+ float D = D_GGX(cNdotH, alpha);
+ float G = G_GGX_2cos(cNdotL, alpha) * G_GGX_2cos(cNdotV, alpha);
+# endif
+ // F
+ float F0 = 1.0; // FIXME
+ float cLdotH5 = SchlickFresnel(cLdotH);
+ float F = mix(cLdotH5, 1.0, F0);
+
+ float specular_brdf_NL = cNdotL * D * F * G;
+
+ specular_light += specular_brdf_NL * light_color * specular_blob_intensity * attenuation;
+#endif
+
+#if defined(LIGHT_USE_CLEARCOAT)
+ if (clearcoat_gloss > 0.0) {
+# if !defined(SPECULAR_SCHLICK_GGX) && !defined(SPECULAR_BLINN)
+ vec3 H = normalize(V + L);
+# endif
+# if !defined(SPECULAR_SCHLICK_GGX)
+ float cNdotH = max(dot(N,H), 0.0);
+ float cLdotH = max(dot(L,H), 0.0);
+ float cLdotH5 = SchlickFresnel(cLdotH);
+#endif
+ float Dr = GTR1(cNdotH, mix(.1, .001, clearcoat_gloss));
+ float Fr = mix(.04, 1.0, cLdotH5);
+ float Gr = G_GGX_2cos(cNdotL, .25) * G_GGX_2cos(cNdotV, .25);
+
+
+ float specular_brdf_NL = 0.25 * clearcoat * Gr * Fr * Dr * cNdotL;
+
+ specular_light += specular_brdf_NL * light_color * specular_blob_intensity * attenuation;
+ }
+#endif
+ }
+
+
+#endif //defined(USE_LIGHT_SHADER_CODE)
+}
+
+
+float sample_shadow(highp sampler2DShadow shadow, vec2 shadow_pixel_size, vec2 pos, float depth, vec4 clamp_rect) {
+
+#ifdef SHADOW_MODE_PCF_13
+
+ float avg=textureProj(shadow,vec4(pos,depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(shadow_pixel_size.x,0.0),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(-shadow_pixel_size.x,0.0),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(0.0,shadow_pixel_size.y),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(0.0,-shadow_pixel_size.y),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(shadow_pixel_size.x,shadow_pixel_size.y),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(-shadow_pixel_size.x,shadow_pixel_size.y),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(shadow_pixel_size.x,-shadow_pixel_size.y),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(-shadow_pixel_size.x,-shadow_pixel_size.y),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(shadow_pixel_size.x*2.0,0.0),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(-shadow_pixel_size.x*2.0,0.0),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(0.0,shadow_pixel_size.y*2.0),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(0.0,-shadow_pixel_size.y*2.0),depth,1.0));
+ return avg*(1.0/13.0);
+
+#elif defined(SHADOW_MODE_PCF_5)
+
+ float avg=textureProj(shadow,vec4(pos,depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(shadow_pixel_size.x,0.0),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(-shadow_pixel_size.x,0.0),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(0.0,shadow_pixel_size.y),depth,1.0));
+ avg+=textureProj(shadow,vec4(pos+vec2(0.0,-shadow_pixel_size.y),depth,1.0));
+ return avg*(1.0/5.0);
+
+#else
+
+ return textureProj(shadow,vec4(pos,depth,1.0));
+
+#endif
+
+}
+
+#ifdef RENDER_DEPTH_DUAL_PARABOLOID
+
+in highp float dp_clip;
+
+#endif
+
+
+
+#if 0
+//need to save texture depth for this
+
+vec3 light_transmittance(float translucency,vec3 light_vec, vec3 normal, vec3 pos, float distance) {
+
+ float scale = 8.25 * (1.0 - translucency) / subsurface_scatter_width;
+ float d = scale * distance;
+
+ /**
+ * Armed with the thickness, we can now calculate the color by means of the
+ * precalculated transmittance profile.
+ * (It can be precomputed into a texture, for maximum performance):
+ */
+ float dd = -d * d;
+ vec3 profile = vec3(0.233, 0.455, 0.649) * exp(dd / 0.0064) +
+ vec3(0.1, 0.336, 0.344) * exp(dd / 0.0484) +
+ vec3(0.118, 0.198, 0.0) * exp(dd / 0.187) +
+ vec3(0.113, 0.007, 0.007) * exp(dd / 0.567) +
+ vec3(0.358, 0.004, 0.0) * exp(dd / 1.99) +
+ vec3(0.078, 0.0, 0.0) * exp(dd / 7.41);
+
+ /**
+ * Using the profile, we finally approximate the transmitted lighting from
+ * the back of the object:
+ */
+ return profile * clamp(0.3 + dot(light_vec, normal),0.0,1.0);
+}
+#endif
+
+void light_process_omni(int idx, vec3 vertex, vec3 eye_vec,vec3 normal,vec3 binormal, vec3 tangent, vec3 albedo, vec3 transmission, float roughness, float metallic, float rim, float rim_tint, float clearcoat, float clearcoat_gloss, float anisotropy, float p_blob_intensity, inout vec3 diffuse_light, inout vec3 specular_light) {
+
+ vec3 light_rel_vec = omni_lights[idx].light_pos_inv_radius.xyz-vertex;
+ float light_length = length( light_rel_vec );
+ float normalized_distance = light_length*omni_lights[idx].light_pos_inv_radius.w;
+ vec3 light_attenuation = vec3(pow( max(1.0 - normalized_distance, 0.0), omni_lights[idx].light_direction_attenuation.w ));
+
+ if (omni_lights[idx].light_params.w>0.5) {
+ //there is a shadowmap
+
+ highp vec3 splane=(omni_lights[idx].shadow_matrix * vec4(vertex,1.0)).xyz;
+ float shadow_len=length(splane);
+ splane=normalize(splane);
+ vec4 clamp_rect=omni_lights[idx].light_clamp;
+
+ if (splane.z>=0.0) {
+
+ splane.z+=1.0;
+
+ clamp_rect.y+=clamp_rect.w;
+
+ } else {
+
+ splane.z=1.0 - splane.z;
+
+ /*
+ if (clamp_rect.z<clamp_rect.w) {
+ clamp_rect.x+=clamp_rect.z;
+ } else {
+ clamp_rect.y+=clamp_rect.w;
+ }
+ */
+
+ }
+
+ splane.xy/=splane.z;
+ splane.xy=splane.xy * 0.5 + 0.5;
+ splane.z = shadow_len * omni_lights[idx].light_pos_inv_radius.w;
+
+ splane.xy = clamp_rect.xy+splane.xy*clamp_rect.zw;
+ float shadow = sample_shadow(shadow_atlas,shadow_atlas_pixel_size,splane.xy,splane.z,clamp_rect);
+
+#ifdef USE_CONTACT_SHADOWS
+
+ if (shadow>0.01 && omni_lights[idx].shadow_color_contact.a>0.0) {
+
+ float contact_shadow = contact_shadow_compute(vertex,normalize(light_rel_vec),min(light_length,omni_lights[idx].shadow_color_contact.a));
+ shadow=min(shadow,contact_shadow);
+
+ }
+#endif
+ light_attenuation*=mix(omni_lights[idx].shadow_color_contact.rgb,vec3(1.0),shadow);
+ }
+
+ light_compute(normal,normalize(light_rel_vec),eye_vec,binormal,tangent,omni_lights[idx].light_color_energy.rgb,light_attenuation,albedo,transmission,omni_lights[idx].light_params.z*p_blob_intensity,roughness,metallic,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light);
+
+}
+
+void light_process_spot(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 binormal, vec3 tangent,vec3 albedo, vec3 transmission,float roughness, float metallic, float rim, float rim_tint, float clearcoat, float clearcoat_gloss,float anisotropy,float p_blob_intensity, inout vec3 diffuse_light, inout vec3 specular_light) {
+
+ vec3 light_rel_vec = spot_lights[idx].light_pos_inv_radius.xyz-vertex;
+ float light_length = length( light_rel_vec );
+ float normalized_distance = light_length*spot_lights[idx].light_pos_inv_radius.w;
+ vec3 light_attenuation = vec3(pow( max(1.0 - normalized_distance, 0.001), spot_lights[idx].light_direction_attenuation.w ));
+ vec3 spot_dir = spot_lights[idx].light_direction_attenuation.xyz;
+ float spot_cutoff=spot_lights[idx].light_params.y;
+ float scos = max(dot(-normalize(light_rel_vec), spot_dir),spot_cutoff);
+ float spot_rim = (1.0 - scos) / (1.0 - spot_cutoff);
+ light_attenuation *= 1.0 - pow( max(spot_rim,0.001), spot_lights[idx].light_params.x);
+
+ if (spot_lights[idx].light_params.w>0.5) {
+ //there is a shadowmap
+ highp vec4 splane=(spot_lights[idx].shadow_matrix * vec4(vertex,1.0));
+ splane.xyz/=splane.w;
+
+ float shadow = sample_shadow(shadow_atlas,shadow_atlas_pixel_size,splane.xy,splane.z,spot_lights[idx].light_clamp);
+
+#ifdef USE_CONTACT_SHADOWS
+ if (shadow>0.01 && spot_lights[idx].shadow_color_contact.a>0.0) {
+
+ float contact_shadow = contact_shadow_compute(vertex,normalize(light_rel_vec),min(light_length,spot_lights[idx].shadow_color_contact.a));
+ shadow=min(shadow,contact_shadow);
+
+ }
+#endif
+ light_attenuation*=mix(spot_lights[idx].shadow_color_contact.rgb,vec3(1.0),shadow);
+ }
+
+ light_compute(normal,normalize(light_rel_vec),eye_vec,binormal,tangent,spot_lights[idx].light_color_energy.rgb,light_attenuation,albedo,transmission,spot_lights[idx].light_params.z*p_blob_intensity,roughness,metallic,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light);
+
+}
+
+void reflection_process(int idx, vec3 vertex, vec3 normal,vec3 binormal, vec3 tangent,float roughness,float anisotropy,vec3 ambient,vec3 skybox, inout highp vec4 reflection_accum,inout highp vec4 ambient_accum) {
+
+ vec3 ref_vec = normalize(reflect(vertex,normal));
+ vec3 local_pos = (reflections[idx].local_matrix * vec4(vertex,1.0)).xyz;
+ vec3 box_extents = reflections[idx].box_extents.xyz;
+
+ if (any(greaterThan(abs(local_pos),box_extents))) { //out of the reflection box
+ return;
+ }
+
+ vec3 inner_pos = abs(local_pos / box_extents);
+ float blend = max(inner_pos.x,max(inner_pos.y,inner_pos.z));
+ //make blend more rounded
+ blend=mix(length(inner_pos),blend,blend);
+ blend*=blend;
+ blend=1.001-blend;
+
+ if (reflections[idx].params.x>0.0){// compute reflection
+
+ vec3 local_ref_vec = (reflections[idx].local_matrix * vec4(ref_vec,0.0)).xyz;
+
+ if (reflections[idx].params.w > 0.5) { //box project
+
+ vec3 nrdir = normalize(local_ref_vec);
+ vec3 rbmax = (box_extents - local_pos)/nrdir;
+ vec3 rbmin = (-box_extents - local_pos)/nrdir;
+
+
+ vec3 rbminmax = mix(rbmin,rbmax,greaterThan(nrdir,vec3(0.0,0.0,0.0)));
+
+ float fa = min(min(rbminmax.x, rbminmax.y), rbminmax.z);
+ vec3 posonbox = local_pos + nrdir * fa;
+ local_ref_vec = posonbox - reflections[idx].box_offset.xyz;
+ }
+
+
+ vec4 clamp_rect=reflections[idx].atlas_clamp;
+ vec3 norm = normalize(local_ref_vec);
+ norm.xy/=1.0+abs(norm.z);
+ norm.xy=norm.xy * vec2(0.5,0.25) + vec2(0.5,0.25);
+ if (norm.z>0.0) {
+ norm.y=0.5-norm.y+0.5;
+ }
+
+ vec2 atlas_uv = norm.xy * clamp_rect.zw + clamp_rect.xy;
+ atlas_uv = clamp(atlas_uv,clamp_rect.xy,clamp_rect.xy+clamp_rect.zw);
+
+ highp vec4 reflection;
+ reflection.rgb = textureLod(reflection_atlas,atlas_uv,roughness*5.0).rgb;
+
+ if (reflections[idx].params.z < 0.5) {
+ reflection.rgb = mix(skybox,reflection.rgb,blend);
+ }
+ reflection.rgb*=reflections[idx].params.x;
+ reflection.a = blend;
+ reflection.rgb*=reflection.a;
+
+ reflection_accum+=reflection;
+ }
+
+ if (reflections[idx].ambient.a>0.0) { //compute ambient using skybox
+
+
+ vec3 local_amb_vec = (reflections[idx].local_matrix * vec4(normal,0.0)).xyz;
+
+ vec3 splane=normalize(local_amb_vec);
+ vec4 clamp_rect=reflections[idx].atlas_clamp;
+
+ splane.z*=-1.0;
+ if (splane.z>=0.0) {
+ splane.z+=1.0;
+ clamp_rect.y+=clamp_rect.w;
+ } else {
+ splane.z=1.0 - splane.z;
+ splane.y=-splane.y;
+ }
+
+ splane.xy/=splane.z;
+ splane.xy=splane.xy * 0.5 + 0.5;
+
+ splane.xy = splane.xy * clamp_rect.zw + clamp_rect.xy;
+ splane.xy = clamp(splane.xy,clamp_rect.xy,clamp_rect.xy+clamp_rect.zw);
+
+ highp vec4 ambient_out;
+ ambient_out.a=blend;
+ ambient_out.rgb = textureLod(reflection_atlas,splane.xy,5.0).rgb;
+ ambient_out.rgb=mix(reflections[idx].ambient.rgb,ambient_out.rgb,reflections[idx].ambient.a);
+ if (reflections[idx].params.z < 0.5) {
+ ambient_out.rgb = mix(ambient,ambient_out.rgb,blend);
+ }
+
+ ambient_out.rgb *= ambient_out.a;
+ ambient_accum+=ambient_out;
+ } else {
+
+ highp vec4 ambient_out;
+ ambient_out.a=blend;
+ ambient_out.rgb=reflections[idx].ambient.rgb;
+ if (reflections[idx].params.z < 0.5) {
+ ambient_out.rgb = mix(ambient,ambient_out.rgb,blend);
+ }
+ ambient_out.rgb *= ambient_out.a;
+ ambient_accum+=ambient_out;
+
+ }
+}
+
+#ifdef USE_GI_PROBES
+
+uniform mediump sampler3D gi_probe1; //texunit:-9
+uniform highp mat4 gi_probe_xform1;
+uniform highp vec3 gi_probe_bounds1;
+uniform highp vec3 gi_probe_cell_size1;
+uniform highp float gi_probe_multiplier1;
+uniform highp float gi_probe_bias1;
+uniform highp float gi_probe_normal_bias1;
+uniform bool gi_probe_blend_ambient1;
+
+uniform mediump sampler3D gi_probe2; //texunit:-10
+uniform highp mat4 gi_probe_xform2;
+uniform highp vec3 gi_probe_bounds2;
+uniform highp vec3 gi_probe_cell_size2;
+uniform highp float gi_probe_multiplier2;
+uniform highp float gi_probe_bias2;
+uniform highp float gi_probe_normal_bias2;
+uniform bool gi_probe2_enabled;
+uniform bool gi_probe_blend_ambient2;
+
+vec3 voxel_cone_trace(mediump sampler3D probe, vec3 cell_size, vec3 pos, vec3 ambient, bool blend_ambient, vec3 direction, float tan_half_angle, float max_distance, float p_bias) {
+
+ float dist = p_bias;//1.0; //dot(direction,mix(vec3(-1.0),vec3(1.0),greaterThan(direction,vec3(0.0))))*2.0;
+ float alpha=0.0;
+ vec3 color = vec3(0.0);
+
+ while(dist < max_distance && alpha < 0.95) {
+ float diameter = max(1.0, 2.0 * tan_half_angle * dist);
+ vec4 scolor = textureLod(probe, (pos + dist * direction) * cell_size, log2(diameter) );
+ float a = (1.0 - alpha);
+ color += scolor.rgb * a;
+ alpha += a * scolor.a;
+ dist += diameter * 0.5;
+ }
+
+ if (blend_ambient) {
+ color.rgb = mix(ambient,color.rgb,min(1.0,alpha/0.95));
+ }
+
+ return color;
+}
+
+void gi_probe_compute(mediump sampler3D probe, mat4 probe_xform, vec3 bounds,vec3 cell_size,vec3 pos, vec3 ambient, vec3 environment, bool blend_ambient,float multiplier, mat3 normal_mtx,vec3 ref_vec, float roughness,float p_bias,float p_normal_bias, inout vec4 out_spec, inout vec4 out_diff) {
+
+
+
+ vec3 probe_pos = (probe_xform * vec4(pos,1.0)).xyz;
+ vec3 ref_pos = (probe_xform * vec4(pos+ref_vec,1.0)).xyz;
+ ref_vec = normalize(ref_pos - probe_pos);
+
+ probe_pos+=(probe_xform * vec4(normal_mtx[2],0.0)).xyz*p_normal_bias;
+
+/* out_diff.rgb = voxel_cone_trace(probe,cell_size,probe_pos,normalize((probe_xform * vec4(ref_vec,0.0)).xyz),0.0 ,100.0);
+ out_diff.a = 1.0;
+ return;*/
+ //out_diff = vec4(textureLod(probe,probe_pos*cell_size,3.0).rgb,1.0);
+ //return;
+
+ //this causes corrupted pixels, i have no idea why..
+ if (any(bvec2(any(lessThan(probe_pos,vec3(0.0))),any(greaterThan(probe_pos,bounds))))) {
+ return;
+ }
+
+ //vec3 blendv = probe_pos/bounds * 2.0 - 1.0;
+ //float blend = 1.001-max(blendv.x,max(blendv.y,blendv.z));
+ float blend=1.0;
+
+ float max_distance = length(bounds);
+
+ //radiance
+#ifdef VCT_QUALITY_HIGH
+
+#define MAX_CONE_DIRS 6
+ vec3 cone_dirs[MAX_CONE_DIRS] = vec3[] (
+ vec3(0, 0, 1),
+ vec3(0.866025, 0, 0.5),
+ vec3(0.267617, 0.823639, 0.5),
+ vec3(-0.700629, 0.509037, 0.5),
+ vec3(-0.700629, -0.509037, 0.5),
+ vec3(0.267617, -0.823639, 0.5)
+ );
+
+ float cone_weights[MAX_CONE_DIRS] = float[](0.25, 0.15, 0.15, 0.15, 0.15, 0.15);
+ float cone_angle_tan = 0.577;
+ float min_ref_tan = 0.0;
+#else
+
+#define MAX_CONE_DIRS 4
+
+ vec3 cone_dirs[MAX_CONE_DIRS] = vec3[] (
+ vec3(0.707107, 0, 0.707107),
+ vec3(0, 0.707107, 0.707107),
+ vec3(-0.707107, 0, 0.707107),
+ vec3(0, -0.707107, 0.707107)
+ );
+
+ float cone_weights[MAX_CONE_DIRS] = float[](0.25, 0.25, 0.25, 0.25);
+ float cone_angle_tan = 0.98269;
+ max_distance*=0.5;
+ float min_ref_tan = 0.2;
+
+#endif
+ vec3 light=vec3(0.0);
+ for(int i=0;i<MAX_CONE_DIRS;i++) {
+
+ vec3 dir = normalize( (probe_xform * vec4(pos + normal_mtx * cone_dirs[i],1.0)).xyz - probe_pos);
+ light+=cone_weights[i] * voxel_cone_trace(probe,cell_size,probe_pos,ambient,blend_ambient,dir,cone_angle_tan,max_distance,p_bias);
+
+ }
+
+ light*=multiplier;
+
+ out_diff += vec4(light*blend,blend);
+
+ //irradiance
+
+ vec3 irr_light = voxel_cone_trace(probe,cell_size,probe_pos,environment,blend_ambient,ref_vec,max(min_ref_tan,tan(roughness * 0.5 * M_PI)) ,max_distance,p_bias);
+
+ irr_light *= multiplier;
+ //irr_light=vec3(0.0);
+
+ out_spec += vec4(irr_light*blend,blend);
+
+}
+
+
+void gi_probes_compute(vec3 pos, vec3 normal, float roughness, inout vec3 out_specular, inout vec3 out_ambient) {
+
+ roughness = roughness * roughness;
+
+ vec3 ref_vec = normalize(reflect(normalize(pos),normal));
+
+ //find arbitrary tangent and bitangent, then build a matrix
+ vec3 v0 = abs(normal.z) < 0.999 ? vec3(0, 0, 1) : vec3(0, 1, 0);
+ vec3 tangent = normalize(cross(v0, normal));
+ vec3 bitangent = normalize(cross(tangent, normal));
+ mat3 normal_mat = mat3(tangent,bitangent,normal);
+
+ vec4 diff_accum = vec4(0.0);
+ vec4 spec_accum = vec4(0.0);
+
+ vec3 ambient = out_ambient;
+ out_ambient = vec3(0.0);
+
+ vec3 environment = out_specular;
+
+ out_specular = vec3(0.0);
+
+ gi_probe_compute(gi_probe1,gi_probe_xform1,gi_probe_bounds1,gi_probe_cell_size1,pos,ambient,environment,gi_probe_blend_ambient1,gi_probe_multiplier1,normal_mat,ref_vec,roughness,gi_probe_bias1,gi_probe_normal_bias1,spec_accum,diff_accum);
+
+ if (gi_probe2_enabled) {
+
+ gi_probe_compute(gi_probe2,gi_probe_xform2,gi_probe_bounds2,gi_probe_cell_size2,pos,ambient,environment,gi_probe_blend_ambient2,gi_probe_multiplier2,normal_mat,ref_vec,roughness,gi_probe_bias2,gi_probe_normal_bias2,spec_accum,diff_accum);
+ }
+
+ if (diff_accum.a>0.0) {
+ diff_accum.rgb/=diff_accum.a;
+ }
+
+ if (spec_accum.a>0.0) {
+ spec_accum.rgb/=spec_accum.a;
+ }
+
+ out_specular+=spec_accum.rgb;
+ out_ambient+=diff_accum.rgb;
+
+}
+
+#endif
+
+
+
+void main() {
+
+#ifdef RENDER_DEPTH_DUAL_PARABOLOID
+
+ if (dp_clip>0.0)
+ discard;
+#endif
+
+ //lay out everything, whathever is unused is optimized away anyway
+ highp vec3 vertex = vertex_interp;
+ vec3 albedo = vec3(0.8,0.8,0.8);
+ vec3 transmission = vec3(0.0);
+ float metallic = 0.0;
+ float specular = 0.5;
+ vec3 emission = vec3(0.0,0.0,0.0);
+ float roughness = 1.0;
+ float rim = 0.0;
+ float rim_tint = 0.0;
+ float clearcoat=0.0;
+ float clearcoat_gloss=0.0;
+ float anisotropy = 1.0;
+ vec2 anisotropy_flow = vec2(1.0,0.0);
+
+#if defined(ENABLE_AO)
+ float ao=1.0;
+ float ao_light_affect=0.0;
+#endif
+
+ float alpha = 1.0;
+
+#ifdef METERIAL_DOUBLESIDED
+ float side=float(gl_FrontFacing)*2.0-1.0;
+#else
+ float side=1.0;
+#endif
+
+
+#if defined(ALPHA_SCISSOR_USED)
+ float alpha_scissor = 0.5;
+#endif
+
+#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
+ vec3 binormal = normalize(binormal_interp)*side;
+ vec3 tangent = normalize(tangent_interp)*side;
+#else
+ vec3 binormal = vec3(0.0);
+ vec3 tangent = vec3(0.0);
+#endif
+ vec3 normal = normalize(normal_interp)*side;
+
+#if defined(ENABLE_UV_INTERP)
+ vec2 uv = uv_interp;
+#endif
+
+#if defined(ENABLE_UV2_INTERP)
+ vec2 uv2 = uv2_interp;
+#endif
+
+#if defined(ENABLE_COLOR_INTERP)
+ vec4 color = color_interp;
+#endif
+
+#if defined(ENABLE_NORMALMAP)
+
+ vec3 normalmap = vec3(0.0);
+#endif
+
+ float normaldepth=1.0;
+
+#if defined(SCREEN_UV_USED)
+ vec2 screen_uv = gl_FragCoord.xy*screen_pixel_size;
+#endif
+
+#if defined (ENABLE_SSS)
+ float sss_strength=0.0;
+#endif
+
+{
+
+
+FRAGMENT_SHADER_CODE
+
+}
+
+
+#if defined(ALPHA_SCISSOR_USED)
+ if (alpha<alpha_scissor) {
+ discard;
+ }
+#endif
+
+#ifdef USE_OPAQUE_PREPASS
+
+ if (alpha<0.99) {
+ discard;
+ }
+#endif
+
+#if defined(ENABLE_NORMALMAP)
+
+ normalmap.xy=normalmap.xy*2.0-1.0;
+ normalmap.z=sqrt(1.0-dot(normalmap.xy,normalmap.xy)); //always ignore Z, as it can be RG packed, Z may be pos/neg, etc.
+
+ normal = normalize( mix(normal_interp,tangent * normalmap.x + binormal * normalmap.y + normal * normalmap.z,normaldepth) ) * side;
+
+#endif
+
+#if defined(LIGHT_USE_ANISOTROPY)
+
+ if (anisotropy>0.01) {
+ //rotation matrix
+ mat3 rot = mat3( tangent, binormal, normal );
+ //make local to space
+ tangent = normalize(rot * vec3(anisotropy_flow.x,anisotropy_flow.y,0.0));
+ binormal = normalize(rot * vec3(-anisotropy_flow.y,anisotropy_flow.x,0.0));
+ }
+
+#endif
+
+#ifdef ENABLE_CLIP_ALPHA
+ if (albedo.a<0.99) {
+ //used for doublepass and shadowmapping
+ discard;
+ }
+#endif
+
+/////////////////////// LIGHTING //////////////////////////////
+
+ //apply energy conservation
+
+#ifdef USE_VERTEX_LIGHTING
+
+ vec3 specular_light = specular_light_interp.rgb;
+ vec3 diffuse_light = diffuse_light_interp.rgb;
+#else
+
+ vec3 specular_light = vec3(0.0,0.0,0.0);
+ vec3 diffuse_light = vec3(0.0,0.0,0.0);
+
+#endif
+
+ vec3 ambient_light;
+ vec3 env_reflection_light = vec3(0.0,0.0,0.0);
+
+ vec3 eye_vec = -normalize( vertex_interp );
+
+
+
+#ifdef USE_RADIANCE_MAP
+
+ if (no_ambient_light) {
+ ambient_light=vec3(0.0,0.0,0.0);
+ } else {
+ {
+
+ { //read radiance from dual paraboloid
+
+ vec3 ref_vec = reflect(-eye_vec,normal); //2.0 * ndotv * normal - view; // reflect(v, n);
+ ref_vec=normalize((radiance_inverse_xform * vec4(ref_vec,0.0)).xyz);
+ vec3 radiance = textureDualParaboloid(radiance_map,ref_vec,roughness) * bg_energy;
+ env_reflection_light = radiance;
+
+ }
+ //no longer a cubemap
+ //vec3 radiance = textureLod(radiance_cube, r, lod).xyz * ( brdf.x + brdf.y);
+
+ }
+
+ {
+
+ vec3 ambient_dir=normalize((radiance_inverse_xform * vec4(normal,0.0)).xyz);
+ vec3 env_ambient=textureDualParaboloid(radiance_map,ambient_dir,1.0) * bg_energy;
+
+ ambient_light=mix(ambient_light_color.rgb,env_ambient,radiance_ambient_contribution);
+ //ambient_light=vec3(0.0,0.0,0.0);
+ }
+ }
+
+#else
+
+ if (no_ambient_light){
+ ambient_light=vec3(0.0,0.0,0.0);
+ } else {
+ ambient_light=ambient_light_color.rgb;
+ }
+#endif
+
+ ambient_light*=ambient_energy;
+
+ float specular_blob_intensity=1.0;
+#if defined(SPECULAR_TOON)
+ specular_blob_intensity*=specular * 2.0;
+#endif
+
+#if defined(USE_LIGHT_DIRECTIONAL)
+
+ vec3 light_attenuation=vec3(1.0);
+
+ float depth_z = -vertex.z;
+#ifdef LIGHT_DIRECTIONAL_SHADOW
+
+#ifdef LIGHT_USE_PSSM4
+ if (depth_z < shadow_split_offsets.w) {
+#elif defined(LIGHT_USE_PSSM2)
+ if (depth_z < shadow_split_offsets.y) {
+#else
+ if (depth_z < shadow_split_offsets.x) {
+#endif //LIGHT_USE_PSSM4
+
+ vec3 pssm_coord;
+ float pssm_fade=0.0;
+
+#ifdef LIGHT_USE_PSSM_BLEND
+ float pssm_blend;
+ vec3 pssm_coord2;
+ bool use_blend=true;
+#endif
+
+
+#ifdef LIGHT_USE_PSSM4
+
+
+ if (depth_z < shadow_split_offsets.y) {
+
+ if (depth_z < shadow_split_offsets.x) {
+
+ highp vec4 splane=(shadow_matrix1 * vec4(vertex,1.0));
+ pssm_coord=splane.xyz/splane.w;
+
+
+#if defined(LIGHT_USE_PSSM_BLEND)
+
+ splane=(shadow_matrix2 * vec4(vertex,1.0));
+ pssm_coord2=splane.xyz/splane.w;
+ pssm_blend=smoothstep(0.0,shadow_split_offsets.x,depth_z);
+#endif
+
+ } else {
+
+ highp vec4 splane=(shadow_matrix2 * vec4(vertex,1.0));
+ pssm_coord=splane.xyz/splane.w;
+
+#if defined(LIGHT_USE_PSSM_BLEND)
+ splane=(shadow_matrix3 * vec4(vertex,1.0));
+ pssm_coord2=splane.xyz/splane.w;
+ pssm_blend=smoothstep(shadow_split_offsets.x,shadow_split_offsets.y,depth_z);
+#endif
+
+ }
+ } else {
+
+
+ if (depth_z < shadow_split_offsets.z) {
+
+ highp vec4 splane=(shadow_matrix3 * vec4(vertex,1.0));
+ pssm_coord=splane.xyz/splane.w;
+
+#if defined(LIGHT_USE_PSSM_BLEND)
+ splane=(shadow_matrix4 * vec4(vertex,1.0));
+ pssm_coord2=splane.xyz/splane.w;
+ pssm_blend=smoothstep(shadow_split_offsets.y,shadow_split_offsets.z,depth_z);
+#endif
+
+ } else {
+
+ highp vec4 splane=(shadow_matrix4 * vec4(vertex,1.0));
+ pssm_coord=splane.xyz/splane.w;
+ pssm_fade = smoothstep(shadow_split_offsets.z,shadow_split_offsets.w,depth_z);
+
+#if defined(LIGHT_USE_PSSM_BLEND)
+ use_blend=false;
+
+#endif
+
+ }
+ }
+
+
+
+#endif //LIGHT_USE_PSSM4
+
+#ifdef LIGHT_USE_PSSM2
+
+ if (depth_z < shadow_split_offsets.x) {
+
+ highp vec4 splane=(shadow_matrix1 * vec4(vertex,1.0));
+ pssm_coord=splane.xyz/splane.w;
+
+
+#if defined(LIGHT_USE_PSSM_BLEND)
+
+ splane=(shadow_matrix2 * vec4(vertex,1.0));
+ pssm_coord2=splane.xyz/splane.w;
+ pssm_blend=smoothstep(0.0,shadow_split_offsets.x,depth_z);
+#endif
+
+ } else {
+ highp vec4 splane=(shadow_matrix2 * vec4(vertex,1.0));
+ pssm_coord=splane.xyz/splane.w;
+ pssm_fade = smoothstep(shadow_split_offsets.x,shadow_split_offsets.y,depth_z);
+#if defined(LIGHT_USE_PSSM_BLEND)
+ use_blend=false;
+
+#endif
+
+ }
+
+#endif //LIGHT_USE_PSSM2
+
+#if !defined(LIGHT_USE_PSSM4) && !defined(LIGHT_USE_PSSM2)
+ { //regular orthogonal
+ highp vec4 splane=(shadow_matrix1 * vec4(vertex,1.0));
+ pssm_coord=splane.xyz/splane.w;
+ }
+#endif
+
+
+ //one one sample
+
+ float shadow = sample_shadow(directional_shadow,directional_shadow_pixel_size,pssm_coord.xy,pssm_coord.z,light_clamp);
+
+#if defined(LIGHT_USE_PSSM_BLEND)
+
+ if (use_blend) {
+ shadow=mix(shadow, sample_shadow(directional_shadow,directional_shadow_pixel_size,pssm_coord2.xy,pssm_coord2.z,light_clamp),pssm_blend);
+ }
+#endif
+
+#ifdef USE_CONTACT_SHADOWS
+ if (shadow>0.01 && shadow_color_contact.a>0.0) {
+
+ float contact_shadow = contact_shadow_compute(vertex,-light_direction_attenuation.xyz,shadow_color_contact.a);
+ shadow=min(shadow,contact_shadow);
+
+ }
+#endif
+ light_attenuation=mix(mix(shadow_color_contact.rgb,vec3(1.0),shadow),vec3(1.0),pssm_fade);
+
+
+ }
+
+
+#endif //LIGHT_DIRECTIONAL_SHADOW
+
+#ifdef USE_VERTEX_LIGHTING
+ diffuse_light*=mix(vec3(1.0),light_attenuation,diffuse_light_interp.a);
+ specular_light*=mix(vec3(1.0),light_attenuation,specular_light_interp.a);
+
+#else
+ light_compute(normal,-light_direction_attenuation.xyz,eye_vec,binormal,tangent,light_color_energy.rgb,light_attenuation,albedo,transmission,light_params.z*specular_blob_intensity,roughness,metallic,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light);
+#endif
+
+
+#endif //#USE_LIGHT_DIRECTIONAL
+
+#ifdef USE_GI_PROBES
+ gi_probes_compute(vertex,normal,roughness,env_reflection_light,ambient_light);
+
+#endif
+
+#ifdef USE_FORWARD_LIGHTING
+
+
+ highp vec4 reflection_accum = vec4(0.0,0.0,0.0,0.0);
+ highp vec4 ambient_accum = vec4(0.0,0.0,0.0,0.0);
+ for(int i=0;i<reflection_count;i++) {
+ reflection_process(reflection_indices[i],vertex,normal,binormal,tangent,roughness,anisotropy,ambient_light,env_reflection_light,reflection_accum,ambient_accum);
+ }
+
+ if (reflection_accum.a>0.0) {
+ specular_light+=reflection_accum.rgb/reflection_accum.a;
+ } else {
+ specular_light+=env_reflection_light;
+ }
+
+ if (ambient_accum.a>0.0) {
+ ambient_light+=ambient_accum.rgb/ambient_accum.a;
+ }
+
+
+
+#ifdef USE_VERTEX_LIGHTING
+
+ diffuse_light*=albedo;
+#else
+
+ for(int i=0;i<omni_light_count;i++) {
+ light_process_omni(omni_light_indices[i],vertex,eye_vec,normal,binormal,tangent,albedo,transmission,roughness,metallic,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,specular_blob_intensity,diffuse_light,specular_light);
+ }
+
+ for(int i=0;i<spot_light_count;i++) {
+ light_process_spot(spot_light_indices[i],vertex,eye_vec,normal,binormal,tangent,albedo,transmission,roughness,metallic,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,specular_blob_intensity,diffuse_light,specular_light);
+ }
+
+#endif //USE_VERTEX_LIGHTING
+
+#endif
+
+
+
+
+#ifdef RENDER_DEPTH
+//nothing happens, so a tree-ssa optimizer will result in no fragment shader :)
+#else
+
+ specular_light*=reflection_multiplier;
+ ambient_light*=albedo; //ambient must be multiplied by albedo at the end
+
+#if defined(ENABLE_AO)
+ ambient_light*=ao;
+ ao_light_affect = mix(1.0,ao,ao_light_affect);
+ specular_light*=ao_light_affect;
+ diffuse_light*=ao_light_affect;
+#endif
+
+
+
+ //energy conservation
+ diffuse_light *= 1.0-metallic; // TODO: avoid all diffuse and ambient light calculations when metallic == 1 up to this point
+ ambient_light *= 1.0-metallic;
+
+
+ {
+
+#if defined(DIFFUSE_TOON)
+ //simplify for toon, as
+ specular_light *= specular * metallic * albedo * 2.0;
+#else
+ // Environment brdf approximation (Lazarov 2013)
+ // see https://www.unrealengine.com/en-US/blog/physically-based-shading-on-mobile
+ const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);
+ const vec4 c1 = vec4( 1.0, 0.0425, 1.04, -0.04);
+ vec4 r = roughness * c0 + c1;
+ float ndotv = clamp(dot(normal,eye_vec),0.0,1.0);
+ float a004 = min( r.x * r.x, exp2( -9.28 * ndotv ) ) * r.x + r.y;
+ vec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;
+
+ vec3 specular_color = metallic_to_specular_color(metallic, specular, albedo);
+ specular_light *= AB.x * specular_color + AB.y;
+#endif
+
+ }
+
+ if (fog_color_enabled.a > 0.5) {
+
+ float fog_amount=0.0;
+
+
+
+#ifdef USE_LIGHT_DIRECTIONAL
+
+ vec3 fog_color = mix( fog_color_enabled.rgb, fog_sun_color_amount.rgb,fog_sun_color_amount.a * pow(max( dot(normalize(vertex),-light_direction_attenuation.xyz), 0.0),8.0) );
+#else
+
+ vec3 fog_color = fog_color_enabled.rgb;
+#endif
+
+ //apply fog
+
+ if (fog_depth_enabled) {
+
+ float fog_z = smoothstep(fog_depth_begin,z_far,length(vertex));
+
+ fog_amount = pow(fog_z,fog_depth_curve);
+ if (fog_transmit_enabled) {
+ vec3 total_light = emission + ambient_light + specular_light + diffuse_light;
+ float transmit = pow(fog_z,fog_transmit_curve);
+ fog_color = mix(max(total_light,fog_color),fog_color,transmit);
+ }
+ }
+
+ if (fog_height_enabled) {
+ float y = (camera_matrix * vec4(vertex,1.0)).y;
+ fog_amount = max(fog_amount,pow(smoothstep(fog_height_min,fog_height_max,y),fog_height_curve));
+ }
+
+ float rev_amount = 1.0 - fog_amount;
+
+
+ emission = emission * rev_amount + fog_color * fog_amount;
+ ambient_light*=rev_amount;
+ specular_light*rev_amount;
+ diffuse_light*=rev_amount;
+
+ }
+
+#ifdef USE_MULTIPLE_RENDER_TARGETS
+
+
+#ifdef SHADELESS
+ diffuse_buffer=vec4(albedo.rgb,0.0);
+ specular_buffer=vec4(0.0);
+
+#else
+
+#if defined(ENABLE_AO)
+
+ float ambient_scale=0.0; // AO is supplied by material
+#else
+ //approximate ambient scale for SSAO, since we will lack full ambient
+ float max_emission=max(emission.r,max(emission.g,emission.b));
+ float max_ambient=max(ambient_light.r,max(ambient_light.g,ambient_light.b));
+ float max_diffuse=max(diffuse_light.r,max(diffuse_light.g,diffuse_light.b));
+ float total_ambient = max_ambient+max_diffuse+max_emission;
+ float ambient_scale = (total_ambient>0.0) ? (max_ambient+ambient_occlusion_affect_light*max_diffuse)/total_ambient : 0.0;
+#endif //ENABLE_AO
+
+ diffuse_buffer=vec4(emission+diffuse_light+ambient_light,ambient_scale);
+ specular_buffer=vec4(specular_light,metallic);
+
+#endif //SHADELESS
+
+ normal_mr_buffer=vec4(normalize(normal)*0.5+0.5,roughness);
+
+#if defined (ENABLE_SSS)
+ sss_buffer = sss_strength;
+#endif
+
+
+#else //USE_MULTIPLE_RENDER_TARGETS
+
+
+#ifdef SHADELESS
+ frag_color=vec4(albedo,alpha);
+#else
+ frag_color=vec4(emission+ambient_light+diffuse_light+specular_light,alpha);
+#endif //SHADELESS
+
+
+#endif //USE_MULTIPLE_RENDER_TARGETS
+
+
+
+#endif //RENDER_DEPTH
+
+
+}
diff --git a/drivers/gles2/shaders/screen_space_reflection.glsl b/drivers/gles2/shaders/screen_space_reflection.glsl
new file mode 100644
index 0000000000..b2e6f7a736
--- /dev/null
+++ b/drivers/gles2/shaders/screen_space_reflection.glsl
@@ -0,0 +1,318 @@
+[vertex]
+
+
+layout(location=0) in highp vec4 vertex_attrib;
+layout(location=4) in vec2 uv_in;
+
+out vec2 uv_interp;
+out vec2 pos_interp;
+
+void main() {
+
+ uv_interp = uv_in;
+ gl_Position = vertex_attrib;
+ pos_interp.xy=gl_Position.xy;
+}
+
+[fragment]
+
+
+in vec2 uv_interp;
+in vec2 pos_interp;
+
+uniform sampler2D source_diffuse; //texunit:0
+uniform sampler2D source_normal_roughness; //texunit:1
+uniform sampler2D source_depth; //texunit:2
+
+uniform float camera_z_near;
+uniform float camera_z_far;
+
+uniform vec2 viewport_size;
+uniform vec2 pixel_size;
+
+uniform float filter_mipmap_levels;
+
+uniform mat4 inverse_projection;
+uniform mat4 projection;
+
+uniform int num_steps;
+uniform float depth_tolerance;
+uniform float distance_fade;
+uniform float curve_fade_in;
+
+
+layout(location = 0) out vec4 frag_color;
+
+
+vec2 view_to_screen(vec3 view_pos,out float w) {
+ vec4 projected = projection * vec4(view_pos, 1.0);
+ projected.xyz /= projected.w;
+ projected.xy = projected.xy * 0.5 + 0.5;
+ w=projected.w;
+ return projected.xy;
+}
+
+
+
+#define M_PI 3.14159265359
+
+void main() {
+
+
+ ////
+
+ vec4 diffuse = texture( source_diffuse, uv_interp );
+ vec4 normal_roughness = texture( source_normal_roughness, uv_interp);
+
+ vec3 normal;
+
+ normal = normal_roughness.xyz*2.0-1.0;
+
+ float roughness = normal_roughness.w;
+
+ float depth_tex = texture(source_depth,uv_interp).r;
+
+ vec4 world_pos = inverse_projection * vec4( uv_interp*2.0-1.0, depth_tex*2.0-1.0, 1.0 );
+ vec3 vertex = world_pos.xyz/world_pos.w;
+
+ vec3 view_dir = normalize(vertex);
+ vec3 ray_dir = normalize(reflect(view_dir, normal));
+
+ if (dot(ray_dir,normal)<0.001) {
+ frag_color=vec4(0.0);
+ return;
+ }
+ //ray_dir = normalize(view_dir - normal * dot(normal,view_dir) * 2.0);
+
+ //ray_dir = normalize(vec3(1,1,-1));
+
+
+ ////////////////
+
+
+ //make ray length and clip it against the near plane (don't want to trace beyond visible)
+ float ray_len = (vertex.z + ray_dir.z * camera_z_far) > -camera_z_near ? (-camera_z_near - vertex.z) / ray_dir.z : camera_z_far;
+ vec3 ray_end = vertex + ray_dir*ray_len;
+
+ float w_begin;
+ vec2 vp_line_begin = view_to_screen(vertex,w_begin);
+ float w_end;
+ vec2 vp_line_end = view_to_screen( ray_end, w_end);
+ vec2 vp_line_dir = vp_line_end-vp_line_begin;
+
+ //we need to interpolate w along the ray, to generate perspective correct reflections
+
+ w_begin = 1.0/w_begin;
+ w_end = 1.0/w_end;
+
+
+ float z_begin = vertex.z*w_begin;
+ float z_end = ray_end.z*w_end;
+
+ vec2 line_begin = vp_line_begin/pixel_size;
+ vec2 line_dir = vp_line_dir/pixel_size;
+ float z_dir = z_end - z_begin;
+ float w_dir = w_end - w_begin;
+
+
+ // clip the line to the viewport edges
+
+ float scale_max_x = min(1.0, 0.99 * (1.0 - vp_line_begin.x) / max(1e-5, vp_line_dir.x));
+ float scale_max_y = min(1.0, 0.99 * (1.0 - vp_line_begin.y) / max(1e-5, vp_line_dir.y));
+ float scale_min_x = min(1.0, 0.99 * vp_line_begin.x / max(1e-5, -vp_line_dir.x));
+ float scale_min_y = min(1.0, 0.99 * vp_line_begin.y / max(1e-5, -vp_line_dir.y));
+ float line_clip = min(scale_max_x, scale_max_y) * min(scale_min_x, scale_min_y);
+ line_dir *= line_clip;
+ z_dir *= line_clip;
+ w_dir *=line_clip;
+
+ //clip z and w advance to line advance
+ vec2 line_advance = normalize(line_dir); //down to pixel
+ float step_size = length(line_advance)/length(line_dir);
+ float z_advance = z_dir*step_size; // adapt z advance to line advance
+ float w_advance = w_dir*step_size; // adapt w advance to line advance
+
+ //make line advance faster if direction is closer to pixel edges (this avoids sampling the same pixel twice)
+ float advance_angle_adj = 1.0/max(abs(line_advance.x),abs(line_advance.y));
+ line_advance*=advance_angle_adj; // adapt z advance to line advance
+ z_advance*=advance_angle_adj;
+ w_advance*=advance_angle_adj;
+
+ vec2 pos = line_begin;
+ float z = z_begin;
+ float w = w_begin;
+ float z_from=z/w;
+ float z_to=z_from;
+ float depth;
+ vec2 prev_pos=pos;
+
+ bool found=false;
+
+ float steps_taken=0.0;
+
+ for(int i=0;i<num_steps;i++) {
+
+ pos+=line_advance;
+ z+=z_advance;
+ w+=w_advance;
+
+ //convert to linear depth
+
+ depth = texture(source_depth, pos*pixel_size).r * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ depth = ((depth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
+ depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - depth * (camera_z_far - camera_z_near));
+#endif
+ depth=-depth;
+
+ z_from = z_to;
+ z_to = z/w;
+
+ if (depth>z_to) {
+ //if depth was surpassed
+ if (depth<=max(z_to,z_from)+depth_tolerance) {
+ //check the depth tolerance
+ found=true;
+ }
+ break;
+ }
+
+ steps_taken+=1.0;
+ prev_pos=pos;
+ }
+
+
+
+
+ if (found) {
+
+ float margin_blend=1.0;
+
+
+ vec2 margin = vec2((viewport_size.x+viewport_size.y)*0.5*0.05); //make a uniform margin
+ if (any(bvec4(lessThan(pos,-margin),greaterThan(pos,viewport_size+margin)))) {
+ //clip outside screen + margin
+ frag_color=vec4(0.0);
+ return;
+ }
+
+ {
+ //blend fading out towards external margin
+ vec2 margin_grad = mix(pos-viewport_size,-pos,lessThan(pos,vec2(0.0)));
+ margin_blend = 1.0-smoothstep(0.0,margin.x,max(margin_grad.x,margin_grad.y));
+ //margin_blend=1.0;
+
+ }
+
+ vec2 final_pos;
+ float grad;
+ grad=steps_taken/float(num_steps);
+ float initial_fade = curve_fade_in==0.0 ? 1.0 : pow(clamp(grad,0.0,1.0),curve_fade_in);
+ float fade = pow(clamp(1.0-grad,0.0,1.0),distance_fade)*initial_fade;
+ final_pos=pos;
+
+
+
+
+
+
+
+#ifdef REFLECT_ROUGHNESS
+
+
+ vec4 final_color;
+ //if roughness is enabled, do screen space cone tracing
+ if (roughness > 0.001) {
+ ///////////////////////////////////////////////////////////////////////////////////////
+ //use a blurred version (in consecutive mipmaps) of the screen to simulate roughness
+
+ float gloss = 1.0-roughness;
+ float cone_angle = roughness * M_PI * 0.5;
+ vec2 cone_dir = final_pos - line_begin;
+ float cone_len = length(cone_dir);
+ cone_dir = normalize(cone_dir); //will be used normalized from now on
+ float max_mipmap = filter_mipmap_levels - 1.0;
+ float gloss_mult=gloss;
+
+ float rem_alpha=1.0;
+ final_color = vec4(0.0);
+
+ for(int i=0;i<7;i++) {
+
+ float op_len = 2.0 * tan(cone_angle) * cone_len; //opposite side of iso triangle
+ float radius;
+ {
+ //fit to sphere inside cone (sphere ends at end of cone), something like this:
+ // ___
+ // \O/
+ // V
+ //
+ // as it avoids bleeding from beyond the reflection as much as possible. As a plus
+ // it also makes the rough reflection more elongated.
+ float a = op_len;
+ float h = cone_len;
+ float a2 = a * a;
+ float fh2 = 4.0f * h * h;
+ radius = (a * (sqrt(a2 + fh2) - a)) / (4.0f * h);
+ }
+
+ //find the place where screen must be sampled
+ vec2 sample_pos = ( line_begin + cone_dir * (cone_len - radius) ) * pixel_size;
+ //radius is in pixels, so it's natural that log2(radius) maps to the right mipmap for the amount of pixels
+ float mipmap = clamp( log2( radius ), 0.0, max_mipmap );
+
+ //mipmap = max(mipmap-1.0,0.0);
+ //do sampling
+
+ vec4 sample_color;
+ {
+ sample_color = textureLod(source_diffuse,sample_pos,mipmap);
+ }
+
+ //multiply by gloss
+ sample_color.rgb*=gloss_mult;
+ sample_color.a=gloss_mult;
+
+ rem_alpha -= sample_color.a;
+ if(rem_alpha < 0.0) {
+ sample_color.rgb *= (1.0 - abs(rem_alpha));
+ }
+
+ final_color+=sample_color;
+
+ if (final_color.a>=0.95) {
+ // This code of accumulating gloss and aborting on near one
+ // makes sense when you think of cone tracing.
+ // Think of it as if roughness was 0, then we could abort on the first
+ // iteration. For lesser roughness values, we need more iterations, but
+ // each needs to have less influence given the sphere is smaller
+ break;
+ }
+
+ cone_len-=radius*2.0; //go to next (smaller) circle.
+
+ gloss_mult*=gloss;
+
+
+ }
+ } else {
+ final_color = textureLod(source_diffuse,final_pos*pixel_size,0.0);
+ }
+
+ frag_color = vec4(final_color.rgb,fade*margin_blend);
+
+#else
+ frag_color = vec4(textureLod(source_diffuse,final_pos*pixel_size,0.0).rgb,fade*margin_blend);
+#endif
+
+
+
+ } else {
+ frag_color = vec4(0.0,0.0,0.0,0.0);
+ }
+
+
+
+}
+
diff --git a/drivers/gles2/shaders/ssao.glsl b/drivers/gles2/shaders/ssao.glsl
new file mode 100644
index 0000000000..219f0957e0
--- /dev/null
+++ b/drivers/gles2/shaders/ssao.glsl
@@ -0,0 +1,293 @@
+[vertex]
+
+
+layout(location=0) in highp vec4 vertex_attrib;
+
+void main() {
+
+ gl_Position = vertex_attrib;
+ gl_Position.z=1.0;
+}
+
+[fragment]
+
+#define TWO_PI 6.283185307179586476925286766559
+
+#ifdef SSAO_QUALITY_HIGH
+
+#define NUM_SAMPLES (80)
+
+#endif
+
+#ifdef SSAO_QUALITY_LOW
+
+#define NUM_SAMPLES (15)
+
+#endif
+
+#if !defined(SSAO_QUALITY_LOW) && !defined(SSAO_QUALITY_HIGH)
+
+#define NUM_SAMPLES (40)
+
+#endif
+
+// If using depth mip levels, the log of the maximum pixel offset before we need to switch to a lower
+// miplevel to maintain reasonable spatial locality in the cache
+// If this number is too small (< 3), too many taps will land in the same pixel, and we'll get bad variance that manifests as flashing.
+// If it is too high (> 5), we'll get bad performance because we're not using the MIP levels effectively
+#define LOG_MAX_OFFSET (3)
+
+// This must be less than or equal to the MAX_MIP_LEVEL defined in SSAO.cpp
+#define MAX_MIP_LEVEL (4)
+
+// This is the number of turns around the circle that the spiral pattern makes. This should be prime to prevent
+// taps from lining up. This particular choice was tuned for NUM_SAMPLES == 9
+
+const int ROTATIONS[] = int[]( 1, 1, 2, 3, 2, 5, 2, 3, 2,
+3, 3, 5, 5, 3, 4, 7, 5, 5, 7,
+9, 8, 5, 5, 7, 7, 7, 8, 5, 8,
+11, 12, 7, 10, 13, 8, 11, 8, 7, 14,
+11, 11, 13, 12, 13, 19, 17, 13, 11, 18,
+19, 11, 11, 14, 17, 21, 15, 16, 17, 18,
+13, 17, 11, 17, 19, 18, 25, 18, 19, 19,
+29, 21, 19, 27, 31, 29, 21, 18, 17, 29,
+31, 31, 23, 18, 25, 26, 25, 23, 19, 34,
+19, 27, 21, 25, 39, 29, 17, 21, 27 );
+
+//#define NUM_SPIRAL_TURNS (7)
+const int NUM_SPIRAL_TURNS = ROTATIONS[NUM_SAMPLES-1];
+
+uniform sampler2D source_depth; //texunit:0
+uniform highp usampler2D source_depth_mipmaps; //texunit:1
+uniform sampler2D source_normal; //texunit:2
+
+uniform ivec2 screen_size;
+uniform float camera_z_far;
+uniform float camera_z_near;
+
+uniform float intensity_div_r6;
+uniform float radius;
+
+#ifdef ENABLE_RADIUS2
+uniform float intensity_div_r62;
+uniform float radius2;
+#endif
+
+uniform float bias;
+uniform float proj_scale;
+
+layout(location = 0) out float visibility;
+
+uniform vec4 proj_info;
+
+vec3 reconstructCSPosition(vec2 S, float z) {
+#ifdef USE_ORTHOGONAL_PROJECTION
+ return vec3((S.xy * proj_info.xy + proj_info.zw), z);
+#else
+ return vec3((S.xy * proj_info.xy + proj_info.zw) * z, z);
+
+#endif
+}
+
+vec3 getPosition(ivec2 ssP) {
+ vec3 P;
+ P.z = texelFetch(source_depth, ssP, 0).r;
+
+ P.z = P.z * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ P.z = ((P.z + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
+ P.z = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - P.z * (camera_z_far - camera_z_near));
+#endif
+ P.z = -P.z;
+
+ // Offset to pixel center
+ P = reconstructCSPosition(vec2(ssP) + vec2(0.5), P.z);
+ return P;
+}
+
+/** Reconstructs screen-space unit normal from screen-space position */
+vec3 reconstructCSFaceNormal(vec3 C) {
+ return normalize(cross(dFdy(C), dFdx(C)));
+}
+
+
+
+/** Returns a unit vector and a screen-space radius for the tap on a unit disk (the caller should scale by the actual disk radius) */
+vec2 tapLocation(int sampleNumber, float spinAngle, out float ssR){
+ // Radius relative to ssR
+ float alpha = (float(sampleNumber) + 0.5) * (1.0 / float(NUM_SAMPLES));
+ float angle = alpha * (float(NUM_SPIRAL_TURNS) * 6.28) + spinAngle;
+
+ ssR = alpha;
+ return vec2(cos(angle), sin(angle));
+}
+
+
+/** Read the camera-space position of the point at screen-space pixel ssP + unitOffset * ssR. Assumes length(unitOffset) == 1 */
+vec3 getOffsetPosition(ivec2 ssC, vec2 unitOffset, float ssR) {
+ // Derivation:
+ // mipLevel = floor(log(ssR / MAX_OFFSET));
+ int mipLevel = clamp(int(floor(log2(ssR))) - LOG_MAX_OFFSET, 0, MAX_MIP_LEVEL);
+
+ ivec2 ssP = ivec2(ssR * unitOffset) + ssC;
+
+ vec3 P;
+
+ // We need to divide by 2^mipLevel to read the appropriately scaled coordinate from a MIP-map.
+ // Manually clamp to the texture size because texelFetch bypasses the texture unit
+ ivec2 mipP = clamp(ssP >> mipLevel, ivec2(0), (screen_size >> mipLevel) - ivec2(1));
+
+
+ if (mipLevel < 1) {
+ //read from depth buffer
+ P.z = texelFetch(source_depth, mipP, 0).r;
+ P.z = P.z * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ P.z = ((P.z + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
+ P.z = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - P.z * (camera_z_far - camera_z_near));
+
+#endif
+ P.z = -P.z;
+
+ } else {
+ //read from mipmaps
+ uint d = texelFetch(source_depth_mipmaps, mipP, mipLevel-1).r;
+ P.z = -(float(d)/65535.0)*camera_z_far;
+ }
+
+
+ // Offset to pixel center
+ P = reconstructCSPosition(vec2(ssP) + vec2(0.5), P.z);
+
+ return P;
+}
+
+
+
+/** Compute the occlusion due to sample with index \a i about the pixel at \a ssC that corresponds
+ to camera-space point \a C with unit normal \a n_C, using maximum screen-space sampling radius \a ssDiskRadius
+
+ Note that units of H() in the HPG12 paper are meters, not
+ unitless. The whole falloff/sampling function is therefore
+ unitless. In this implementation, we factor out (9 / radius).
+
+ Four versions of the falloff function are implemented below
+*/
+float sampleAO(in ivec2 ssC, in vec3 C, in vec3 n_C, in float ssDiskRadius,in float p_radius, in int tapIndex, in float randomPatternRotationAngle) {
+ // Offset on the unit disk, spun for this pixel
+ float ssR;
+ vec2 unitOffset = tapLocation(tapIndex, randomPatternRotationAngle, ssR);
+ ssR *= ssDiskRadius;
+
+ // The occluding point in camera space
+ vec3 Q = getOffsetPosition(ssC, unitOffset, ssR);
+
+ vec3 v = Q - C;
+
+ float vv = dot(v, v);
+ float vn = dot(v, n_C);
+
+ const float epsilon = 0.01;
+ float radius2 = p_radius*p_radius;
+
+ // A: From the HPG12 paper
+ // Note large epsilon to avoid overdarkening within cracks
+ //return float(vv < radius2) * max((vn - bias) / (epsilon + vv), 0.0) * radius2 * 0.6;
+
+ // B: Smoother transition to zero (lowers contrast, smoothing out corners). [Recommended]
+ float f=max(radius2 - vv, 0.0);
+ return f * f * f * max((vn - bias) / (epsilon + vv), 0.0);
+
+ // C: Medium contrast (which looks better at high radii), no division. Note that the
+ // contribution still falls off with radius^2, but we've adjusted the rate in a way that is
+ // more computationally efficient and happens to be aesthetically pleasing.
+ // return 4.0 * max(1.0 - vv * invRadius2, 0.0) * max(vn - bias, 0.0);
+
+ // D: Low contrast, no division operation
+ // return 2.0 * float(vv < radius * radius) * max(vn - bias, 0.0);
+}
+
+
+
+void main() {
+
+
+ // Pixel being shaded
+ ivec2 ssC = ivec2(gl_FragCoord.xy);
+
+ // World space point being shaded
+ vec3 C = getPosition(ssC);
+
+/* if (C.z <= -camera_z_far*0.999) {
+ // We're on the skybox
+ visibility=1.0;
+ return;
+ }*/
+
+ //visibility=-C.z/camera_z_far;
+ //return;
+#if 0
+ vec3 n_C = texelFetch(source_normal,ssC,0).rgb * 2.0 - 1.0;
+#else
+ vec3 n_C = reconstructCSFaceNormal(C);
+ n_C = -n_C;
+#endif
+
+ // Hash function used in the HPG12 AlchemyAO paper
+ float randomPatternRotationAngle = mod(float((3 * ssC.x ^ ssC.y + ssC.x * ssC.y) * 10), TWO_PI);
+
+ // Reconstruct normals from positions. These will lead to 1-pixel black lines
+ // at depth discontinuities, however the blur will wipe those out so they are not visible
+ // in the final image.
+
+ // Choose the screen-space sample radius
+ // proportional to the projected area of the sphere
+#ifdef USE_ORTHOGONAL_PROJECTION
+ float ssDiskRadius = -proj_scale * radius;
+#else
+ float ssDiskRadius = -proj_scale * radius / C.z;
+#endif
+ float sum = 0.0;
+ for (int i = 0; i < NUM_SAMPLES; ++i) {
+ sum += sampleAO(ssC, C, n_C, ssDiskRadius, radius,i, randomPatternRotationAngle);
+ }
+
+ float A = max(0.0, 1.0 - sum * intensity_div_r6 * (5.0 / float(NUM_SAMPLES)));
+
+#ifdef ENABLE_RADIUS2
+
+ //go again for radius2
+ randomPatternRotationAngle = mod(float((5 * ssC.x ^ ssC.y + ssC.x * ssC.y) * 11), TWO_PI);
+
+ // Reconstruct normals from positions. These will lead to 1-pixel black lines
+ // at depth discontinuities, however the blur will wipe those out so they are not visible
+ // in the final image.
+
+ // Choose the screen-space sample radius
+ // proportional to the projected area of the sphere
+ ssDiskRadius = -proj_scale * radius2 / C.z;
+
+ sum = 0.0;
+ for (int i = 0; i < NUM_SAMPLES; ++i) {
+ sum += sampleAO(ssC, C, n_C, ssDiskRadius,radius2, i, randomPatternRotationAngle);
+ }
+
+ A= min(A,max(0.0, 1.0 - sum * intensity_div_r62 * (5.0 / float(NUM_SAMPLES))));
+#endif
+ // Bilateral box-filter over a quad for free, respecting depth edges
+ // (the difference that this makes is subtle)
+ if (abs(dFdx(C.z)) < 0.02) {
+ A -= dFdx(A) * (float(ssC.x & 1) - 0.5);
+ }
+ if (abs(dFdy(C.z)) < 0.02) {
+ A -= dFdy(A) * (float(ssC.y & 1) - 0.5);
+ }
+
+ visibility = A;
+
+}
+
+
+
diff --git a/drivers/gles2/shaders/ssao_blur.glsl b/drivers/gles2/shaders/ssao_blur.glsl
new file mode 100644
index 0000000000..472dc21acf
--- /dev/null
+++ b/drivers/gles2/shaders/ssao_blur.glsl
@@ -0,0 +1,124 @@
+[vertex]
+
+
+layout(location=0) in highp vec4 vertex_attrib;
+
+
+void main() {
+
+ gl_Position = vertex_attrib;
+ gl_Position.z=1.0;
+}
+
+[fragment]
+
+
+uniform sampler2D source_ssao; //texunit:0
+uniform sampler2D source_depth; //texunit:1
+uniform sampler2D source_normal; //texunit:3
+
+
+layout(location = 0) out float visibility;
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+// Tunable Parameters:
+
+/** Increase to make depth edges crisper. Decrease to reduce flicker. */
+uniform float edge_sharpness;
+
+/** Step in 2-pixel intervals since we already blurred against neighbors in the
+ first AO pass. This constant can be increased while R decreases to improve
+ performance at the expense of some dithering artifacts.
+
+ Morgan found that a scale of 3 left a 1-pixel checkerboard grid that was
+ unobjectionable after shading was applied but eliminated most temporal incoherence
+ from using small numbers of sample taps.
+ */
+
+uniform int filter_scale;
+
+/** Filter radius in pixels. This will be multiplied by SCALE. */
+#define R (4)
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+
+// Gaussian coefficients
+const float gaussian[R + 1] =
+// float[](0.356642, 0.239400, 0.072410, 0.009869);
+// float[](0.398943, 0.241971, 0.053991, 0.004432, 0.000134); // stddev = 1.0
+ float[](0.153170, 0.144893, 0.122649, 0.092902, 0.062970); // stddev = 2.0
+// float[](0.111220, 0.107798, 0.098151, 0.083953, 0.067458, 0.050920, 0.036108); // stddev = 3.0
+
+/** (1, 0) or (0, 1)*/
+uniform ivec2 axis;
+
+uniform float camera_z_far;
+uniform float camera_z_near;
+
+uniform ivec2 screen_size;
+
+void main() {
+
+ ivec2 ssC = ivec2(gl_FragCoord.xy);
+
+ float depth = texelFetch(source_depth, ssC, 0).r;
+ //vec3 normal = texelFetch(source_normal,ssC,0).rgb * 2.0 - 1.0;
+
+ depth = depth * 2.0 - 1.0;
+ depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - depth * (camera_z_far - camera_z_near));
+
+ float depth_divide = 1.0 / camera_z_far;
+
+// depth*=depth_divide;
+
+ /*
+ if (depth > camera_z_far*0.999) {
+ discard;//skybox
+ }
+ */
+
+ float sum = texelFetch(source_ssao, ssC, 0).r;
+
+ // Base weight for depth falloff. Increase this for more blurriness,
+ // decrease it for better edge discrimination
+ float BASE = gaussian[0];
+ float totalWeight = BASE;
+ sum *= totalWeight;
+
+ ivec2 clamp_limit = screen_size - ivec2(1);
+
+ for (int r = -R; r <= R; ++r) {
+ // We already handled the zero case above. This loop should be unrolled and the static branch optimized out,
+ // so the IF statement has no runtime cost
+ if (r != 0) {
+
+ ivec2 ppos = ssC + axis * (r * filter_scale);
+ float value = texelFetch(source_ssao, clamp(ppos,ivec2(0),clamp_limit), 0).r;
+ ivec2 rpos = clamp(ppos,ivec2(0),clamp_limit);
+ float temp_depth = texelFetch(source_depth, rpos, 0).r;
+ //vec3 temp_normal = texelFetch(source_normal, rpos, 0).rgb * 2.0 - 1.0;
+
+ temp_depth = temp_depth * 2.0 - 1.0;
+ temp_depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - temp_depth * (camera_z_far - camera_z_near));
+// temp_depth *= depth_divide;
+
+ // spatial domain: offset gaussian tap
+ float weight = 0.3 + gaussian[abs(r)];
+ //weight *= max(0.0,dot(temp_normal,normal));
+
+ // range domain (the "bilateral" weight). As depth difference increases, decrease weight.
+ weight *= max(0.0, 1.0
+ - edge_sharpness * abs(temp_depth - depth)
+ );
+
+ sum += value * weight;
+ totalWeight += weight;
+ }
+ }
+
+ const float epsilon = 0.0001;
+ visibility = sum / (totalWeight + epsilon);
+}
diff --git a/drivers/gles2/shaders/ssao_minify.glsl b/drivers/gles2/shaders/ssao_minify.glsl
new file mode 100644
index 0000000000..647c762438
--- /dev/null
+++ b/drivers/gles2/shaders/ssao_minify.glsl
@@ -0,0 +1,59 @@
+[vertex]
+
+
+layout(location=0) in highp vec4 vertex_attrib;
+
+void main() {
+
+ gl_Position = vertex_attrib;
+}
+
+[fragment]
+
+
+#ifdef MINIFY_START
+
+#define SDEPTH_TYPE highp sampler2D
+uniform float camera_z_far;
+uniform float camera_z_near;
+
+#else
+
+#define SDEPTH_TYPE mediump usampler2D
+
+#endif
+
+uniform SDEPTH_TYPE source_depth; //texunit:0
+
+uniform ivec2 from_size;
+uniform int source_mipmap;
+
+layout(location = 0) out mediump uint depth;
+
+void main() {
+
+
+ ivec2 ssP = ivec2(gl_FragCoord.xy);
+
+ // Rotated grid subsampling to avoid XY directional bias or Z precision bias while downsampling.
+ // On DX9, the bit-and can be implemented with floating-point modulo
+
+#ifdef MINIFY_START
+ float fdepth = texelFetch(source_depth, clamp(ssP * 2 + ivec2(ssP.y & 1, ssP.x & 1), ivec2(0), from_size - ivec2(1)), source_mipmap).r;
+ fdepth = fdepth * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ fdepth = ((fdepth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
+ fdepth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - fdepth * (camera_z_far - camera_z_near));
+#endif
+ fdepth /= camera_z_far;
+ depth = uint(clamp(fdepth*65535.0,0.0,65535.0));
+
+#else
+ depth = texelFetch(source_depth, clamp(ssP * 2 + ivec2(ssP.y & 1, ssP.x & 1), ivec2(0), from_size - ivec2(1)), source_mipmap).r;
+#endif
+
+
+}
+
+
diff --git a/drivers/gles2/shaders/subsurf_scattering.glsl b/drivers/gles2/shaders/subsurf_scattering.glsl
new file mode 100644
index 0000000000..fc66d66198
--- /dev/null
+++ b/drivers/gles2/shaders/subsurf_scattering.glsl
@@ -0,0 +1,192 @@
+[vertex]
+
+
+layout(location=0) in highp vec4 vertex_attrib;
+layout(location=4) in vec2 uv_in;
+
+out vec2 uv_interp;
+
+
+void main() {
+
+ uv_interp = uv_in;
+ gl_Position = vertex_attrib;
+}
+
+[fragment]
+
+//#define QUALIFIER uniform // some guy on the interweb says it may be faster with this
+#define QUALIFIER const
+
+#ifdef USE_25_SAMPLES
+
+const int kernel_size=25;
+QUALIFIER vec2 kernel[25] = vec2[] (
+ vec2(0.530605, 0.0),
+ vec2(0.000973794, -3.0),
+ vec2(0.00333804, -2.52083),
+ vec2(0.00500364, -2.08333),
+ vec2(0.00700976, -1.6875),
+ vec2(0.0094389, -1.33333),
+ vec2(0.0128496, -1.02083),
+ vec2(0.017924, -0.75),
+ vec2(0.0263642, -0.520833),
+ vec2(0.0410172, -0.333333),
+ vec2(0.0493588, -0.1875),
+ vec2(0.0402784, -0.0833333),
+ vec2(0.0211412, -0.0208333),
+ vec2(0.0211412, 0.0208333),
+ vec2(0.0402784, 0.0833333),
+ vec2(0.0493588, 0.1875),
+ vec2(0.0410172, 0.333333),
+ vec2(0.0263642, 0.520833),
+ vec2(0.017924, 0.75),
+ vec2(0.0128496, 1.02083),
+ vec2(0.0094389, 1.33333),
+ vec2(0.00700976, 1.6875),
+ vec2(0.00500364, 2.08333),
+ vec2(0.00333804, 2.52083),
+ vec2(0.000973794, 3.0)
+);
+
+#endif //USE_25_SAMPLES
+
+#ifdef USE_17_SAMPLES
+
+const int kernel_size=17;
+
+QUALIFIER vec2 kernel[17] = vec2[](
+ vec2(0.536343, 0.0),
+ vec2(0.00317394, -2.0),
+ vec2(0.0100386, -1.53125),
+ vec2(0.0144609, -1.125),
+ vec2(0.0216301, -0.78125),
+ vec2(0.0347317, -0.5),
+ vec2(0.0571056, -0.28125),
+ vec2(0.0582416, -0.125),
+ vec2(0.0324462, -0.03125),
+ vec2(0.0324462, 0.03125),
+ vec2(0.0582416, 0.125),
+ vec2(0.0571056, 0.28125),
+ vec2(0.0347317, 0.5),
+ vec2(0.0216301, 0.78125),
+ vec2(0.0144609, 1.125),
+ vec2(0.0100386, 1.53125),
+ vec2(0.00317394,2.0)
+);
+
+#endif //USE_17_SAMPLES
+
+
+#ifdef USE_11_SAMPLES
+
+const int kernel_size=11;
+
+QUALIFIER vec2 kernel[11] = vec2[](
+ vec2(0.560479, 0.0),
+ vec2(0.00471691, -2.0),
+ vec2(0.0192831, -1.28),
+ vec2(0.03639, -0.72),
+ vec2(0.0821904, -0.32),
+ vec2(0.0771802, -0.08),
+ vec2(0.0771802, 0.08),
+ vec2(0.0821904, 0.32),
+ vec2(0.03639, 0.72),
+ vec2(0.0192831, 1.28),
+ vec2(0.00471691,2.0)
+);
+
+#endif //USE_11_SAMPLES
+
+
+
+uniform float max_radius;
+uniform float camera_z_far;
+uniform float camera_z_near;
+uniform float unit_size;
+uniform vec2 dir;
+in vec2 uv_interp;
+
+uniform sampler2D source_diffuse; //texunit:0
+uniform sampler2D source_sss; //texunit:1
+uniform sampler2D source_depth; //texunit:2
+
+layout(location = 0) out vec4 frag_color;
+
+void main() {
+
+ float strength = texture(source_sss,uv_interp).r;
+ strength*=strength; //stored as sqrt
+
+ // Fetch color of current pixel:
+ vec4 base_color = texture(source_diffuse, uv_interp);
+
+
+ if (strength>0.0) {
+
+
+ // Fetch linear depth of current pixel:
+ float depth = texture(source_depth, uv_interp).r * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ depth = ((depth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+ float scale = unit_size; //remember depth is negative by default in OpenGL
+#else
+ depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - depth * (camera_z_far - camera_z_near));
+ float scale = unit_size / depth; //remember depth is negative by default in OpenGL
+#endif
+
+
+
+ // Calculate the final step to fetch the surrounding pixels:
+ vec2 step = max_radius * scale * dir;
+ step *= strength; // Modulate it using the alpha channel.
+ step *= 1.0 / 3.0; // Divide by 3 as the kernels range from -3 to 3.
+
+ // Accumulate the center sample:
+ vec3 color_accum = base_color.rgb;
+ color_accum *= kernel[0].x;
+#ifdef ENABLE_STRENGTH_WEIGHTING
+ float color_weight = kernel[0].x;
+#endif
+
+ // Accumulate the other samples:
+ for (int i = 1; i < kernel_size; i++) {
+ // Fetch color and depth for current sample:
+ vec2 offset = uv_interp + kernel[i].y * step;
+ vec3 color = texture(source_diffuse, offset).rgb;
+
+#ifdef ENABLE_FOLLOW_SURFACE
+ // If the difference in depth is huge, we lerp color back to "colorM":
+ float depth_cmp = texture(source_depth, offset).r *2.0 - 1.0;
+
+#ifdef USE_ORTHOGONAL_PROJECTION
+ depth_cmp = ((depth_cmp + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
+ depth_cmp = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - depth_cmp * (camera_z_far - camera_z_near));
+#endif
+
+ float s = clamp(300.0f * scale *
+ max_radius * abs(depth - depth_cmp),0.0,1.0);
+ color = mix(color, base_color.rgb, s);
+#endif
+
+ // Accumulate:
+ color*=kernel[i].x;
+
+#ifdef ENABLE_STRENGTH_WEIGHTING
+ float color_s = texture(source_sss, offset).r;
+ color_weight+=color_s * kernel[i].x;
+ color*=color_s;
+#endif
+ color_accum += color;
+
+ }
+
+#ifdef ENABLE_STRENGTH_WEIGHTING
+ color_accum/=color_weight;
+#endif
+ frag_color = vec4(color_accum,base_color.a); //keep alpha (used for SSAO)
+ } else {
+ frag_color = base_color;
+ }
+}
diff --git a/drivers/gles2/shaders/tonemap.glsl b/drivers/gles2/shaders/tonemap.glsl
new file mode 100644
index 0000000000..2f671158b2
--- /dev/null
+++ b/drivers/gles2/shaders/tonemap.glsl
@@ -0,0 +1,323 @@
+[vertex]
+
+
+layout(location=0) in highp vec4 vertex_attrib;
+layout(location=4) in vec2 uv_in;
+
+out vec2 uv_interp;
+
+void main() {
+
+ gl_Position = vertex_attrib;
+ uv_interp = uv_in;
+#ifdef V_FLIP
+ uv_interp.y = 1.0-uv_interp.y;
+#endif
+
+}
+
+[fragment]
+
+#if !defined(GLES_OVER_GL)
+precision mediump float;
+#endif
+
+
+in vec2 uv_interp;
+
+uniform highp sampler2D source; //texunit:0
+
+uniform float exposure;
+uniform float white;
+
+#ifdef USE_AUTO_EXPOSURE
+
+uniform highp sampler2D source_auto_exposure; //texunit:1
+uniform highp float auto_exposure_grey;
+
+#endif
+
+#if defined(USE_GLOW_LEVEL1) || defined(USE_GLOW_LEVEL2) || defined(USE_GLOW_LEVEL3) || defined(USE_GLOW_LEVEL4) || defined(USE_GLOW_LEVEL5) || defined(USE_GLOW_LEVEL6) || defined(USE_GLOW_LEVEL7)
+
+uniform highp sampler2D source_glow; //texunit:2
+uniform highp float glow_intensity;
+
+#endif
+
+#ifdef USE_BCS
+
+uniform vec3 bcs;
+
+#endif
+
+#ifdef USE_COLOR_CORRECTION
+
+uniform sampler2D color_correction; //texunit:3
+
+#endif
+
+
+layout(location = 0) out vec4 frag_color;
+
+#ifdef USE_GLOW_FILTER_BICUBIC
+
+// w0, w1, w2, and w3 are the four cubic B-spline basis functions
+float w0(float a)
+{
+ return (1.0/6.0)*(a*(a*(-a + 3.0) - 3.0) + 1.0);
+}
+
+float w1(float a)
+{
+ return (1.0/6.0)*(a*a*(3.0*a - 6.0) + 4.0);
+}
+
+float w2(float a)
+{
+ return (1.0/6.0)*(a*(a*(-3.0*a + 3.0) + 3.0) + 1.0);
+}
+
+float w3(float a)
+{
+ return (1.0/6.0)*(a*a*a);
+}
+
+// g0 and g1 are the two amplitude functions
+float g0(float a)
+{
+ return w0(a) + w1(a);
+}
+
+float g1(float a)
+{
+ return w2(a) + w3(a);
+}
+
+// h0 and h1 are the two offset functions
+float h0(float a)
+{
+ return -1.0 + w1(a) / (w0(a) + w1(a));
+}
+
+float h1(float a)
+{
+ return 1.0 + w3(a) / (w2(a) + w3(a));
+}
+
+uniform ivec2 glow_texture_size;
+
+vec4 texture2D_bicubic(sampler2D tex, vec2 uv,int p_lod)
+{
+ float lod=float(p_lod);
+ vec2 tex_size = vec2(glow_texture_size >> p_lod);
+ vec2 pixel_size =1.0/tex_size;
+ uv = uv*tex_size + 0.5;
+ vec2 iuv = floor( uv );
+ vec2 fuv = fract( uv );
+
+ float g0x = g0(fuv.x);
+ float g1x = g1(fuv.x);
+ float h0x = h0(fuv.x);
+ float h1x = h1(fuv.x);
+ float h0y = h0(fuv.y);
+ float h1y = h1(fuv.y);
+
+ vec2 p0 = (vec2(iuv.x + h0x, iuv.y + h0y) - 0.5) * pixel_size;
+ vec2 p1 = (vec2(iuv.x + h1x, iuv.y + h0y) - 0.5) * pixel_size;
+ vec2 p2 = (vec2(iuv.x + h0x, iuv.y + h1y) - 0.5) * pixel_size;
+ vec2 p3 = (vec2(iuv.x + h1x, iuv.y + h1y) - 0.5) * pixel_size;
+
+ return g0(fuv.y) * (g0x * textureLod(tex, p0,lod) +
+ g1x * textureLod(tex, p1,lod)) +
+ g1(fuv.y) * (g0x * textureLod(tex, p2,lod) +
+ g1x * textureLod(tex, p3,lod));
+}
+
+
+
+#define GLOW_TEXTURE_SAMPLE(m_tex,m_uv,m_lod) texture2D_bicubic(m_tex,m_uv,m_lod)
+
+#else
+
+#define GLOW_TEXTURE_SAMPLE(m_tex,m_uv,m_lod) textureLod(m_tex,m_uv,float(m_lod))
+
+#endif
+
+
+vec3 tonemap_filmic(vec3 color,float white) {
+
+ float A = 0.15;
+ float B = 0.50;
+ float C = 0.10;
+ float D = 0.20;
+ float E = 0.02;
+ float F = 0.30;
+ float W = 11.2;
+
+ vec3 coltn = ((color*(A*color+C*B)+D*E)/(color*(A*color+B)+D*F))-E/F;
+ float whitetn = ((white*(A*white+C*B)+D*E)/(white*(A*white+B)+D*F))-E/F;
+
+ return coltn/whitetn;
+
+}
+
+vec3 tonemap_aces(vec3 color) {
+ float a = 2.51f;
+ float b = 0.03f;
+ float c = 2.43f;
+ float d = 0.59f;
+ float e = 0.14f;
+ return color = clamp((color*(a*color+b))/(color*(c*color+d)+e),vec3(0.0),vec3(1.0));
+}
+
+vec3 tonemap_reindhart(vec3 color,float white) {
+
+ return ( color * ( 1.0 + ( color / ( white) ) ) ) / ( 1.0 + color );
+}
+
+void main() {
+
+ vec4 color = textureLod(source, uv_interp, 0.0);
+
+#ifdef USE_AUTO_EXPOSURE
+
+ color/=texelFetch(source_auto_exposure,ivec2(0,0),0).r/auto_exposure_grey;
+#endif
+
+ color*=exposure;
+
+#if defined(USE_GLOW_LEVEL1) || defined(USE_GLOW_LEVEL2) || defined(USE_GLOW_LEVEL3) || defined(USE_GLOW_LEVEL4) || defined(USE_GLOW_LEVEL5) || defined(USE_GLOW_LEVEL6) || defined(USE_GLOW_LEVEL7)
+#define USING_GLOW
+#endif
+
+#if defined(USING_GLOW)
+ vec3 glow = vec3(0.0);
+
+#ifdef USE_GLOW_LEVEL1
+
+ glow+=GLOW_TEXTURE_SAMPLE(source_glow,uv_interp,1).rgb;
+#endif
+
+#ifdef USE_GLOW_LEVEL2
+ glow+=GLOW_TEXTURE_SAMPLE(source_glow,uv_interp,2).rgb;
+#endif
+
+#ifdef USE_GLOW_LEVEL3
+ glow+=GLOW_TEXTURE_SAMPLE(source_glow,uv_interp,3).rgb;
+#endif
+
+#ifdef USE_GLOW_LEVEL4
+ glow+=GLOW_TEXTURE_SAMPLE(source_glow,uv_interp,4).rgb;
+#endif
+
+#ifdef USE_GLOW_LEVEL5
+ glow+=GLOW_TEXTURE_SAMPLE(source_glow,uv_interp,5).rgb;
+#endif
+
+#ifdef USE_GLOW_LEVEL6
+ glow+=GLOW_TEXTURE_SAMPLE(source_glow,uv_interp,6).rgb;
+#endif
+
+#ifdef USE_GLOW_LEVEL7
+ glow+=GLOW_TEXTURE_SAMPLE(source_glow,uv_interp,7).rgb;
+#endif
+
+
+ glow *= glow_intensity;
+
+#endif
+
+
+#ifdef USE_REINDHART_TONEMAPPER
+
+ color.rgb = tonemap_reindhart(color.rgb,white);
+
+# if defined(USING_GLOW)
+ glow = tonemap_reindhart(glow,white);
+# endif
+
+#endif
+
+#ifdef USE_FILMIC_TONEMAPPER
+
+ color.rgb = tonemap_filmic(color.rgb,white);
+
+# if defined(USING_GLOW)
+ glow = tonemap_filmic(glow,white);
+# endif
+
+#endif
+
+#ifdef USE_ACES_TONEMAPPER
+
+ color.rgb = tonemap_aces(color.rgb);
+
+# if defined(USING_GLOW)
+ glow = tonemap_aces(glow);
+# endif
+
+#endif
+
+ //regular Linear -> SRGB conversion
+ vec3 a = vec3(0.055);
+ color.rgb = mix( (vec3(1.0)+a)*pow(color.rgb,vec3(1.0/2.4))-a , 12.92*color.rgb , lessThan(color.rgb,vec3(0.0031308)));
+
+#if defined(USING_GLOW)
+ glow = mix( (vec3(1.0)+a)*pow(glow,vec3(1.0/2.4))-a , 12.92*glow , lessThan(glow,vec3(0.0031308)));
+#endif
+
+//glow needs to be added in SRGB space (together with image space effects)
+
+ color.rgb = clamp(color.rgb,0.0,1.0);
+
+#if defined(USING_GLOW)
+ glow = clamp(glow,0.0,1.0);
+#endif
+
+#ifdef USE_GLOW_REPLACE
+
+ color.rgb = glow;
+
+#endif
+
+#ifdef USE_GLOW_SCREEN
+
+ color.rgb = max((color.rgb + glow) - (color.rgb * glow), vec3(0.0));
+
+#endif
+
+#ifdef USE_GLOW_SOFTLIGHT
+
+ {
+
+ glow = (glow * 0.5) + 0.5;
+ color.r = (glow.r <= 0.5) ? (color.r - (1.0 - 2.0 * glow.r) * color.r * (1.0 - color.r)) : (((glow.r > 0.5) && (color.r <= 0.25)) ? (color.r + (2.0 * glow.r - 1.0) * (4.0 * color.r * (4.0 * color.r + 1.0) * (color.r - 1.0) + 7.0 * color.r)) : (color.r + (2.0 * glow.r - 1.0) * (sqrt(color.r) - color.r)));
+ color.g = (glow.g <= 0.5) ? (color.g - (1.0 - 2.0 * glow.g) * color.g * (1.0 - color.g)) : (((glow.g > 0.5) && (color.g <= 0.25)) ? (color.g + (2.0 * glow.g - 1.0) * (4.0 * color.g * (4.0 * color.g + 1.0) * (color.g - 1.0) + 7.0 * color.g)) : (color.g + (2.0 * glow.g - 1.0) * (sqrt(color.g) - color.g)));
+ color.b = (glow.b <= 0.5) ? (color.b - (1.0 - 2.0 * glow.b) * color.b * (1.0 - color.b)) : (((glow.b > 0.5) && (color.b <= 0.25)) ? (color.b + (2.0 * glow.b - 1.0) * (4.0 * color.b * (4.0 * color.b + 1.0) * (color.b - 1.0) + 7.0 * color.b)) : (color.b + (2.0 * glow.b - 1.0) * (sqrt(color.b) - color.b)));
+ }
+
+#endif
+
+#if defined(USING_GLOW) && !defined(USE_GLOW_SCREEN) && !defined(USE_GLOW_SOFTLIGHT) && !defined(USE_GLOW_REPLACE)
+ //additive
+ color.rgb+=glow;
+#endif
+
+#ifdef USE_BCS
+
+ color.rgb = mix(vec3(0.0),color.rgb,bcs.x);
+ color.rgb = mix(vec3(0.5),color.rgb,bcs.y);
+ color.rgb = mix(vec3(dot(vec3(1.0),color.rgb)*0.33333),color.rgb,bcs.z);
+
+#endif
+
+#ifdef USE_COLOR_CORRECTION
+
+ color.r = texture(color_correction,vec2(color.r,0.0)).r;
+ color.g = texture(color_correction,vec2(color.g,0.0)).g;
+ color.b = texture(color_correction,vec2(color.b,0.0)).b;
+#endif
+
+
+ frag_color=vec4(color.rgb,1.0);
+}
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 9d0de930f2..c57d65d321 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -707,6 +707,9 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
channel[i].vu_r->set_min(-80);
channel[i].vu_r->set_max(24);
channel[i].vu_r->set_step(0.1);
+
+ channel[i].peak_l = 0.0f;
+ channel[i].peak_r = 0.0f;
}
scale = memnew(TextureRect);
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 215d2ca551..6cb4ca1e86 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -783,6 +783,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
snap_step = Vector2(10, 10);
snap_separation = Vector2(0, 0);
+ snap_mode = SNAP_NONE;
edited_margin = -1;
drag_index = -1;
drag = false;
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 71c0d8a782..686ad566fd 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -401,7 +401,7 @@ void TileSetEditor::initialize_bottom_editor() {
p.push_back((int)SHAPE_DELETE);
tools[SHAPE_DELETE]->connect("pressed", this, "_on_tool_clicked", p);
tool_containers[TOOLBAR_SHAPE]->add_child(tools[SHAPE_DELETE]);
- tool_containers[TOOLBAR_SHAPE]->add_change_receptor(memnew(VSeparator));
+ tool_containers[TOOLBAR_SHAPE]->add_child(memnew(VSeparator));
tools[SHAPE_KEEP_INSIDE_TILE] = memnew(ToolButton);
tools[SHAPE_KEEP_INSIDE_TILE]->set_toggle_mode(true);
tools[SHAPE_KEEP_INSIDE_TILE]->set_pressed(true);
@@ -561,6 +561,11 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
initialize_bottom_editor();
}
+TileSetEditor::~TileSetEditor() {
+ if (helper)
+ memdelete(helper);
+}
+
void TileSetEditor::_on_tile_list_selected(int p_index) {
if (get_current_tile() >= 0) {
current_item_index = p_index;
diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h
index 0404c5236a..f57ec9a117 100644
--- a/editor/plugins/tile_set_editor_plugin.h
+++ b/editor/plugins/tile_set_editor_plugin.h
@@ -155,6 +155,7 @@ public:
static Error update_library_file(Node *p_base_scene, Ref<TileSet> ml, bool p_merge = true);
TileSetEditor(EditorNode *p_editor);
+ ~TileSetEditor();
private:
void _on_tile_list_selected(int p_index);
diff --git a/editor/translations/af.po b/editor/translations/af.po
index d2aa951580..0f5a2b890f 100644
--- a/editor/translations/af.po
+++ b/editor/translations/af.po
@@ -2400,12 +2400,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7306,6 +7300,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index 69f011012e..7e9f894292 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -2445,12 +2445,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "صيغة غير صالحة لـ version.txt داخل القالب."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr "صيغة غير صالحة لـ version.txt داخل القالب. المراجعة ليست معرÙاً صالحاً."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "لا مل٠version.txt تم إيجاده داخل القالب."
@@ -7359,6 +7353,10 @@ msgstr "بناء المشروع"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8031,6 +8029,12 @@ msgstr ""
msgid "Invalid font size."
msgstr ""
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "صيغة غير صالحة لـ version.txt داخل القالب. المراجعة ليست معرÙاً صالحاً."
+
#~ msgid "Can't write file."
#~ msgstr "لا يمكن كتابة الملÙ."
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index 79b1571b06..24b9345051 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -2375,12 +2375,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7361,6 +7355,10 @@ msgstr "Проект"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index dec1917280..ff5533e22e 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -2519,13 +2519,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "টেমপà§à¦²à§‡à¦Ÿ à¦à¦° version.txt ফরমà§à¦¯à¦¾à¦Ÿ গà§à¦°à¦¹à¦£à¦¯à§‹à¦—à§à¦¯ নয়।"
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"টেমপà§à¦²à§‡à¦Ÿ à¦à¦° version.txt ফরমà§à¦¯à¦¾à¦Ÿ অগà§à¦°à¦¹à¦£à¦¯à§‹à¦—à§à¦¯à¥¤ Revision কোন কাংখিত আইডেনà§à¦Ÿà¦¿à¦«à¦¾à§Ÿà¦¾à¦° নয়।"
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "টেমপà§à¦²à§‡à¦Ÿà§‡ version.txt খà§à¦à¦œà§‡ পাওয়া যায়নি।"
@@ -7748,6 +7741,10 @@ msgstr "নতà§à¦¨ পà§à¦°à¦•à¦²à§à¦ª"
msgid "Warnings"
msgstr "সতরà§à¦•à¦¤à¦¾"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8508,6 +8505,13 @@ msgstr "ফনà§à¦Ÿ তà§à¦²à¦¤à§‡/লোডে সমসà§à¦¯à¦¾ হয়েà¦
msgid "Invalid font size."
msgstr "ফনà§à¦Ÿà§‡à¦° আকার অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯à¥¤"
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "টেমপà§à¦²à§‡à¦Ÿ à¦à¦° version.txt ফরমà§à¦¯à¦¾à¦Ÿ অগà§à¦°à¦¹à¦£à¦¯à§‹à¦—à§à¦¯à¥¤ Revision কোন কাংখিত আইডেনà§à¦Ÿà¦¿à¦«à¦¾à§Ÿà¦¾à¦° "
+#~ "নয়।"
+
#, fuzzy
#~ msgid "Can't write file."
#~ msgstr "টাইলটি খà§à¦à¦œà§‡ পাওয়া যায়নি:"
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index 6b27845274..5af9d98ec6 100644
--- a/editor/translations/ca.po
+++ b/editor/translations/ca.po
@@ -9,7 +9,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2018-01-24 02:50+0000\n"
+"PO-Revision-Date: 2018-02-27 02:34+0000\n"
"Last-Translator: Roger Blanco Ribera <roger.blancoribera@gmail.com>\n"
"Language-Team: Catalan <https://hosted.weblate.org/projects/godot-engine/"
"godot/ca/>\n"
@@ -17,7 +17,7 @@ msgstr ""
"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 2.19-dev\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -2455,14 +2455,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "El format de version.txt dins de les plantilles no és vàlid."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"El format de version.txt dins les plantilles no és vàlid. \"Revision\" no és "
-"un indentificador vàlid."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "No s'ha trobat cap version.txt dins les plantilles."
@@ -3980,7 +3972,7 @@ msgstr "La Malla continguda no és del tipus ArrayMesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "UV Unwrap failed, mesh may not be manifold?"
-msgstr "No s'han pogut desembolcar les UV. Comproveu la topologia de la malla"
+msgstr "No s'han pogut desembolcar les UV. Comproveu la topologia de la malla."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "No mesh to debug."
@@ -5982,11 +5974,12 @@ msgid "Invalid project path (changed anything?)."
msgstr "El Camí del Projecte no és vàlid (S'ha produit algun canvi?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
-msgstr "No es pot editar el fitxer 'project.godot' en el camí del projecte."
+msgstr ""
+"No es pot carregar el fitxer 'project.godot' en el camí del projecte (error "
+"%d). Pot ser que falti o que estigui malmès."
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
@@ -7254,18 +7247,16 @@ msgid "Object can't provide a length."
msgstr "L'objecte no pot proporcionar una longitud."
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "Pestanya Següent"
+msgstr "Pla següent"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "Pestanya Anterior"
+msgstr "Pla anterior"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "Pla:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -7401,7 +7392,7 @@ msgstr "Mono"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "About C# support"
-msgstr ""
+msgstr "Sobre el suport de C#"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "Create C# solution"
@@ -7419,6 +7410,10 @@ msgstr "Munta el Projecte"
msgid "Warnings"
msgstr "Avisos"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -7972,11 +7967,11 @@ msgstr "El node ARVROrigin requreix un node Fill del tipus ARVRCamera"
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(Temps restant: %d:%02d s)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
@@ -8178,6 +8173,13 @@ msgstr "Error carregant lletra."
msgid "Invalid font size."
msgstr "La mida de la lletra no és vàlida."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "El format de version.txt dins les plantilles no és vàlid. \"Revision\" no "
+#~ "és un indentificador vàlid."
+
#~ msgid "Can't write file."
#~ msgstr "No es pot escriure el fitxer."
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index 453253e192..aa29f16038 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -2428,13 +2428,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Neplatný formát version.txt uvnitř šablon."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Neplatný formát version.txt uvnitř šablon. Revize není platný identifikátor."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Nenalezena version.txt uvnitÅ™ Å¡ablon."
@@ -7391,6 +7384,10 @@ msgstr "Sestavit projekt"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
#, fuzzy
msgid ""
@@ -8133,6 +8130,13 @@ msgstr "Chyba nahrávání fontu."
msgid "Invalid font size."
msgstr "Neplatná velikost fontu."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Neplatný formát version.txt uvnitř šablon. Revize není platný "
+#~ "identifikátor."
+
#~ msgid "Can't write file."
#~ msgstr "Nelze zapsat soubor."
diff --git a/editor/translations/da.po b/editor/translations/da.po
index 3825e15c23..ca47dc00e1 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -2485,14 +2485,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Ugyldigt version.txt format inde i skabeloner."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Ugyldigt version.txt format inde i skabeloner. Revision er ikke en gyldig "
-"identifikator."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Ingen version.txt fundet inde i skabeloner."
@@ -7440,6 +7432,10 @@ msgstr "Projekt"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8173,6 +8169,13 @@ msgstr "Error loading skrifttype."
msgid "Invalid font size."
msgstr "Ugyldig skriftstørrelse."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Ugyldigt version.txt format inde i skabeloner. Revision er ikke en gyldig "
+#~ "identifikator."
+
#~ msgid "Can't write file."
#~ msgstr "Kan ikke skrive til fil."
diff --git a/editor/translations/de.po b/editor/translations/de.po
index 2ee39425de..87f69c3fde 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -2486,14 +2486,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Ungültiges version.txt-Format in Templates."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Ungültiges version.txt-Format in Templates. Revision ist kein gültiger "
-"Bezeichner."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Keine version.txt in Templates gefunden."
@@ -7466,6 +7458,10 @@ msgstr "Projekt bauen"
msgid "Warnings"
msgstr "Warnungen"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8243,6 +8239,13 @@ msgstr "Fehler beim Laden der Schriftart."
msgid "Invalid font size."
msgstr "Ungültige Schriftgröße."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Ungültiges version.txt-Format in Templates. Revision ist kein gültiger "
+#~ "Bezeichner."
+
#~ msgid "Can't write file."
#~ msgstr "Konnte Datei nicht schreiben."
diff --git a/editor/translations/de_CH.po b/editor/translations/de_CH.po
index 38b337667e..a9b1b8a994 100644
--- a/editor/translations/de_CH.po
+++ b/editor/translations/de_CH.po
@@ -2398,12 +2398,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7403,6 +7397,10 @@ msgstr "Projektname:"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index eb8a983eb4..7a13a5bcc8 100644
--- a/editor/translations/editor.pot
+++ b/editor/translations/editor.pot
@@ -2357,12 +2357,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7244,6 +7238,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/el.po b/editor/translations/el.po
index 3163d5c277..6eea5da60d 100644
--- a/editor/translations/el.po
+++ b/editor/translations/el.po
@@ -8,7 +8,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2018-01-24 19:46+0000\n"
+"PO-Revision-Date: 2018-02-27 22:19+0000\n"
"Last-Translator: George Tsiamasiotis <gtsiam@windowslive.com>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/"
"el/>\n"
@@ -16,7 +16,7 @@ msgstr ""
"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 2.19-dev\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -2460,14 +2460,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "ΆκυÏη μοÏφή version.txt μέσα στα Ï€Ïότυπα."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"ΆκυÏη μοÏφή version.txt μέσα στα Ï€Ïότυπα. Το Revision δεν είναι έγκυÏο "
-"αναγνωÏιστικό."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Δεν βÏέθηκε version.txt μέσα στα Ï€Ïότυπα."
@@ -6003,12 +5995,12 @@ msgid "Invalid project path (changed anything?)."
msgstr "Μη έγκυÏη διαδÏομή έÏγου (Αλλάξατε τίποτα;)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
msgstr ""
-"Δεν ήταν δυνατή η επεξεÏγασία του project.godot στη διαδÏομή του έÏγου."
+"ΑδÏνατη η φόÏτωση του project.godot (σφάλμα %d). ΜποÏεί να λείπει ή να είναι "
+"κατεστÏαμένο."
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
@@ -7287,18 +7279,16 @@ msgid "Object can't provide a length."
msgstr "Το αντικείμενο δεν έχει μήκος."
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "Επόμενη καÏτέλα"
+msgstr "Επόμενο επίπεδο"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "ΠÏοηγοÏμενη καÏτέλα"
+msgstr "ΠÏοηγοÏμενο επίπεδο"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "Επίπεδο:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -7434,7 +7424,7 @@ msgstr "Μονοφωνικό"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "About C# support"
-msgstr ""
+msgstr "Σχετικά με την υποστήÏιξη C#"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "Create C# solution"
@@ -7452,6 +7442,10 @@ msgstr "Δόμηση έÏγου"
msgid "Warnings"
msgstr "ΠÏοειδοποιήσεις"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8011,11 +8005,11 @@ msgstr "Το ARVROrigin απαιτεί έναν κόμβο ARVRCamera ως παÎ
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(ΟλοκλήÏωση σε: %d:%02d s)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
@@ -8222,6 +8216,13 @@ msgstr "Σφάλμα κατά την φόÏτωση της γÏαμματοσεÎ
msgid "Invalid font size."
msgstr "Μη έγκυÏο μέγεθος γÏαμματοσειÏάς."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "ΆκυÏη μοÏφή version.txt μέσα στα Ï€Ïότυπα. Το Revision δεν είναι έγκυÏο "
+#~ "αναγνωÏιστικό."
+
#~ msgid "Can't write file."
#~ msgstr "Δεν ήταν δυνατή η εγγÏαφή στο αÏχείο."
diff --git a/editor/translations/es.po b/editor/translations/es.po
index 591efe631e..b9b342114c 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -29,8 +29,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-02-19 20:49+0000\n"
-"Last-Translator: anonymous <>\n"
+"PO-Revision-Date: 2018-03-03 09:49+0000\n"
+"Last-Translator: David Arranz <davarrcal@hotmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/"
"godot/es/>\n"
"Language: es\n"
@@ -38,7 +38,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 2.19\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -2096,7 +2096,7 @@ msgstr "Modo Pantalla Completa"
#: editor/editor_node.cpp editor/project_export.cpp
msgid "Manage Export Templates"
-msgstr "Cargando Plantillas de Exportación"
+msgstr "Cargar Plantillas de Exportación"
#: editor/editor_node.cpp
msgid "Help"
@@ -2485,14 +2485,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Formato de \"version.txt\" inválido dentro de las plantillas."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"El archivo \"version.txt\" que hay dentro de las plantillas tiene un formato "
-"inválido. \"Revisión\" no es un identificador válido."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "No se ha encontrado el archivo version.txt dentro de las plantillas."
@@ -3118,7 +3110,7 @@ msgstr "Anterior"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Future"
-msgstr "Futuro"
+msgstr "Posterior"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Depth"
@@ -3653,7 +3645,7 @@ msgstr "Ajustar rotación"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Configure Snap..."
-msgstr "Configurar fijado..."
+msgstr "Configurar Cuadrícula..."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
@@ -4920,7 +4912,7 @@ msgstr "Des/activar «breakpoint»"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Breakpoints"
-msgstr "Desactivar todos los «breakpoints»"
+msgstr "Borrar todos los «breakpoints»"
#: editor/plugins/script_text_editor.cpp
msgid "Goto Next Breakpoint"
@@ -5052,27 +5044,27 @@ msgstr "Cambiar Nombre de Entrada"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Connect Graph Nodes"
-msgstr "Conectar Nodos de Gráfico"
+msgstr "Conectar Nodos Gráficos"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Disconnect Graph Nodes"
-msgstr "Desconectar Nodo de Gráfico"
+msgstr "Desconectar Nodos Gráficos"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Remove Shader Graph Node"
-msgstr "Quitar Nodo de Gráfico de Shaders"
+msgstr "Borrar Nodo Gráfico de Shader"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Move Shader Graph Node"
-msgstr "Mover Nodo de Gráfico de Shaders"
+msgstr "Mover Nodo Gráfico de Shader"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Duplicate Graph Node(s)"
-msgstr "Duplicar Nodo(s) de Gráfico"
+msgstr "Duplicar Nodo(s) Gráfico"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Delete Shader Graph Node(s)"
-msgstr "Quitar Nodo(s) de Gráfico de Shaders"
+msgstr "Borrar Nodo(s) Gráfico(s) de Shader"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Error: Cyclic Connection Link"
@@ -5084,7 +5076,7 @@ msgstr "Error: Conexiones de Entrada Faltantes"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Add Shader Graph Node"
-msgstr "Añadir nodo de gráfico de Shader"
+msgstr "Añadir nodo gráfico de Shader"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Orthogonal"
@@ -5128,7 +5120,7 @@ msgstr "Girando %s grados."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Keying is disabled (no key inserted)."
-msgstr "Poner claves está desactivado (no se insertaron claves)."
+msgstr "Insertar claves está desactivado (no se insertaron claves)."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Animation Key Inserted."
@@ -5144,7 +5136,7 @@ msgstr "Cambios del material"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Shader Changes"
-msgstr "Cambios de shader"
+msgstr "Cambios del shader"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Surface Changes"
@@ -5767,7 +5759,7 @@ msgstr "Borrar selección"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
-msgstr "Pintar TileMap"
+msgstr "Dibujar TileMap"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Line Draw"
@@ -5779,7 +5771,7 @@ msgstr "Dibujar Rectángulo"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Bucket Fill"
-msgstr "Cubo"
+msgstr "Cubo de relleno"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5807,7 +5799,7 @@ msgstr "Voltear verticalmente"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint Tile"
-msgstr "Pintar Tile"
+msgstr "Dibujar Tile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Pick Tile"
@@ -5843,7 +5835,7 @@ msgstr "¿Crear desde escena?"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Merge from scene?"
-msgstr "¿Mergear desde escena?"
+msgstr "¿Mezclar desde escena?"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Tile Set"
@@ -5870,8 +5862,8 @@ msgid ""
"Select sub-tile to use as icon, this will be also used on invalid autotile "
"bindings."
msgstr ""
-"Seleccione sub-tile para utilizar como icono, este se utilizará también en "
-"enlaces de autotile no válidos."
+"Seleccione sub-tile para utilizar como icono, éste se utilizará también en "
+"enlazados automáticos no válidos."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
@@ -5924,7 +5916,7 @@ msgstr "Recursos"
#: editor/project_export.cpp
msgid "Export all resources in the project"
-msgstr "Exportar todos los recursos en el proyecto"
+msgstr "Exportar todos los recursos del proyecto"
#: editor/project_export.cpp
msgid "Export selected scenes (and dependencies)"
@@ -6026,11 +6018,12 @@ msgid "Invalid project path (changed anything?)."
msgstr "La ruta del proyecto no es correcta (¿has cambiado algo?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
-msgstr "No se pudo editar project.godot en la ruta del proyecto."
+msgstr ""
+"No se pudo cargar project.godot desde la ruta de proyecto (error %d). La "
+"ruta no existe o está corrupta."
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
@@ -7307,18 +7300,16 @@ msgid "Object can't provide a length."
msgstr "El objeto no puede proporcionar una longitud."
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "Pestaña siguiente"
+msgstr "Plano siguiente"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "Pestaña anterior"
+msgstr "Plano anterior"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "Plano:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -7454,7 +7445,7 @@ msgstr "Mono"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "About C# support"
-msgstr ""
+msgstr "Sobre el soporte de C#"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "Create C# solution"
@@ -7472,6 +7463,10 @@ msgstr "Compilar proyecto"
msgid "Warnings"
msgstr "Advertencias"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8032,11 +8027,11 @@ msgstr "ARVROrigin necesita un nodo ARVRCamera hijo"
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(Tiempo restante: %d:%02d s)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
@@ -8239,6 +8234,13 @@ msgstr "Error al cargar la tipografía."
msgid "Invalid font size."
msgstr "Tamaño de tipografía incorrecto."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "El archivo \"version.txt\" que hay dentro de las plantillas tiene un "
+#~ "formato inválido. \"Revisión\" no es un identificador válido."
+
#~ msgid "Can't write file."
#~ msgstr "No se puede escribir el archivo."
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index e706603e69..f2d6508201 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-01-24 20:49+0000\n"
+"PO-Revision-Date: 2018-02-24 21:43+0000\n"
"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n"
"Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/"
"godot-engine/godot/es_AR/>\n"
@@ -21,7 +21,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 2.19-dev\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -2464,14 +2464,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Formato de version.txt invalido dentro de plantillas."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Formato de version.txt invalido dentro de plantillas. Revision no es un "
-"identificador valido."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "No se encontro ningún version.txt dentro de las plantillas."
@@ -6002,11 +5994,12 @@ msgid "Invalid project path (changed anything?)."
msgstr "Ruta de proyecto inválida (cambiaste algo?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
-msgstr "No se pudo editar project.godot en la ruta de proyecto."
+msgstr ""
+"No se pudo cargar project.godot desde la ruta de proyecto (error %d). La "
+"ruta no existe o está corrupta."
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
@@ -7281,18 +7274,16 @@ msgid "Object can't provide a length."
msgstr "El objeto no puede proveer un largo."
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "Pestaña siguiente"
+msgstr "Plano siguiente"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "Pestaña anterior"
+msgstr "Plano anterior"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "Plano:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -7428,7 +7419,7 @@ msgstr "Mono"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "About C# support"
-msgstr ""
+msgstr "Sobre el soporte de C#"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "Create C# solution"
@@ -7446,6 +7437,10 @@ msgstr "Construir Proyecto"
msgid "Warnings"
msgstr "Advertencias"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -7999,11 +7994,11 @@ msgstr "ARVROrigin requiere un nodo hijo ARVRCamera"
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(Tiempo Restante: %d:%02d s)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
@@ -8204,6 +8199,13 @@ msgstr "Error cargando tipografía."
msgid "Invalid font size."
msgstr "Tamaño de tipografía inválido."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Formato de version.txt invalido dentro de plantillas. Revision no es un "
+#~ "identificador valido."
+
#~ msgid "Can't write file."
#~ msgstr "No se puede escribir el archivo."
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index 7f784fc253..7bcbeb15f0 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -2399,12 +2399,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7398,6 +7392,10 @@ msgstr "پروژه"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index f9bf16edfe..efc69a02bb 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -2505,14 +2505,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Paketti sisältää viallisen version.txt tiedoston."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Paketti sisältää viallisen version.txt tiedoston. 'Revision' ei ole "
-"hyväksytty tunniste."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "version.txt -tiedostoa ei löytynyt."
@@ -7640,6 +7632,10 @@ msgstr "Uusi projekti"
msgid "Warnings"
msgstr "Varoitus"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8343,6 +8339,13 @@ msgstr "Virhe fontin latauksessa."
msgid "Invalid font size."
msgstr "Virheellinen fonttikoko."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Paketti sisältää viallisen version.txt tiedoston. 'Revision' ei ole "
+#~ "hyväksytty tunniste."
+
#, fuzzy
#~ msgid "Can't write file."
#~ msgstr "Ei voitu kirjoittaa tiedostoa:\n"
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index d08986aa0c..d9fd96081f 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -8,6 +8,7 @@
# Arthur Templé <tuturtemple@gmail.com>, 2018.
# Brice <bbric@free.fr>, 2016.
# Chenebel Dorian <LoubiTek54@gmail.com>, 2016-2017.
+# Cindy Dallaire <c.dallaire93@gmail.com>, 2018.
# derderder77 <derderder77380@gmail.com>, 2016.
# finkiki <specialpopol@gmx.fr>, 2016.
# Gilles Roudiere <gilles.roudiere@gmail.com>, 2017-2018.
@@ -35,8 +36,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-02-06 00:36+0000\n"
-"Last-Translator: Hugo Locurcio <hugo.locurcio@hugo.pro>\n"
+"PO-Revision-Date: 2018-02-24 02:36+0000\n"
+"Last-Translator: Cindy Dallaire <c.dallaire93@gmail.com>\n"
"Language-Team: French <https://hosted.weblate.org/projects/godot-engine/"
"godot/fr/>\n"
"Language: fr\n"
@@ -44,7 +45,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 2.19-dev\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -2496,14 +2497,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Format de version.txt invalide dans les modèles."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Format de version.txt invalide dans les modèles. Revision n'est pas un "
-"identifiant valide."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Aucun version.txt n'a été trouvé dans les modèles."
@@ -6026,7 +6019,7 @@ msgstr "Impossible de créer le dossier."
#: editor/project_manager.cpp
msgid "There is already a folder in this path with the specified name."
-msgstr ""
+msgstr "Un dossier avec le nom spécifié existe déjà dans ce chemin."
#: editor/project_manager.cpp
msgid "It would be a good idea to name your project."
@@ -7344,7 +7337,7 @@ msgstr "Onglet precedent"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "Onglet :"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -7458,7 +7451,7 @@ msgstr "Création des coutours..."
#: modules/mono/editor/godotsharp_editor.cpp
msgid "Generating C# project..."
-msgstr ""
+msgstr "Création du projet C# ..."
#: modules/mono/editor/godotsharp_editor.cpp
#, fuzzy
@@ -7486,7 +7479,7 @@ msgstr "Mono"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "About C# support"
-msgstr ""
+msgstr "À propos du support C#"
#: modules/mono/editor/godotsharp_editor.cpp
#, fuzzy
@@ -7507,6 +7500,10 @@ msgstr "Projet"
msgid "Warnings"
msgstr "Avertissement"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8276,6 +8273,13 @@ msgstr "Erreur lors du chargement de la police."
msgid "Invalid font size."
msgstr "Taille de police invalide."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Format de version.txt invalide dans les modèles. Revision n'est pas un "
+#~ "identifiant valide."
+
#~ msgid "Can't write file."
#~ msgstr "Impossible d'écrire le fichier."
diff --git a/editor/translations/he.po b/editor/translations/he.po
index b35c09bf55..a5f727b8ee 100644
--- a/editor/translations/he.po
+++ b/editor/translations/he.po
@@ -2374,12 +2374,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "תבנית ה־version.txt שגויה בתוך התבניות."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "×œ× × ×ž×¦× version.txt בתוך התבניות."
@@ -7271,6 +7265,10 @@ msgstr ""
msgid "Warnings"
msgstr "×זהרות"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/hi.po b/editor/translations/hi.po
index 76395eea30..cba5b3059b 100644
--- a/editor/translations/hi.po
+++ b/editor/translations/hi.po
@@ -2405,12 +2405,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7305,6 +7299,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index 2e498f29a7..3b728caafc 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -10,7 +10,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2018-02-05 23:37+0000\n"
+"PO-Revision-Date: 2018-02-24 12:37+0000\n"
"Last-Translator: Varga Dániel <danikah.danikah@gmail.com>\n"
"Language-Team: Hungarian <https://hosted.weblate.org/projects/godot-engine/"
"godot/hu/>\n"
@@ -18,7 +18,7 @@ msgstr ""
"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 2.19-dev\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -143,7 +143,7 @@ msgstr "Ãtméretezés A Kurzortól"
#: editor/animation_editor.cpp
msgid "Goto Next Step"
-msgstr "Ugrás A következő lépésre"
+msgstr "Ugrás A Következő Lépésre"
#: editor/animation_editor.cpp
msgid "Goto Prev Step"
@@ -426,7 +426,7 @@ msgid ""
"Node."
msgstr ""
"Nem található a cél metódus! Nevezzen meg egy érvényes metódust, vagy "
-"csatoljon egy scriptet a cél Node-hoz."
+"csatoljon egy szkriptet a cél Node-hoz."
#: editor/connections_dialog.cpp
msgid "Connect To Node:"
@@ -1648,7 +1648,7 @@ msgstr "Jelenet Gyors Megnyitása.."
#: editor/editor_node.cpp
msgid "Quick Open Script.."
-msgstr "Script Gyors Megnyitása.."
+msgstr "Szkript Gyors Megnyitása.."
#: editor/editor_node.cpp
msgid "Save & Close"
@@ -1762,25 +1762,25 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
-"Nem található script mező az addon pluginnak a következő helyen: 'res://"
+"Nem található szkript mező az addon pluginnak a következő helyen: 'res://"
"addons/%s'."
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s'."
-msgstr "Nem sikerült az addon script betöltése a következő útvonalról: '%s'."
+msgstr "Nem sikerült az addon szkript betöltése a következő útvonalról: '%s'."
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
-"Nem sikerült az addon script betöltése a következő útvonalról: '%s' Az "
+"Nem sikerült az addon szkript betöltése a következő útvonalról: '%s' Az "
"alaptípus nem EditorPlugin."
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
-"Nem sikerült az addon script betöltése a következő útvonalról: '%s' A script "
-"nem eszközmódban van."
+"Nem sikerült az addon szkript betöltése a következő útvonalról: '%s' A "
+"szkript nem eszközmódban van."
#: editor/editor_node.cpp
msgid ""
@@ -1950,7 +1950,7 @@ msgstr "Projekt Beállítások"
#: editor/editor_node.cpp
msgid "Run Script"
-msgstr "Script Futtatása"
+msgstr "Szkript Futtatása"
#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export"
@@ -2042,7 +2042,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Sync Script Changes"
-msgstr "Script Változtatások Szinkronizálása"
+msgstr "Szkript Változtatások Szinkronizálása"
#: editor/editor_node.cpp
msgid ""
@@ -2051,7 +2051,7 @@ msgid ""
"When used remotely on a device, this is more efficient with network "
"filesystem."
msgstr ""
-"Ha ez a beállítás be van kapcsolva, bármilyen script, amit elment, újra "
+"Ha ez a beállítás be van kapcsolva, bármilyen szkript, amit elment, újra "
"betöltődik a futó játékba.\n"
"Ha egy távoli eszközön használja, sokkal hatékonyabb a hálózati "
"fájlrendszerrel együtt."
@@ -2250,7 +2250,7 @@ msgstr "Jelszó:"
#: editor/editor_node.cpp
msgid "Open & Run a Script"
-msgstr "Megnyit és Scriptet Futtat"
+msgstr "Szkriptet Megnyit és Futtat"
#: editor/editor_node.cpp
msgid "New Inherited"
@@ -2274,7 +2274,7 @@ msgstr "3D Szerkesztő Megnyitása"
#: editor/editor_node.cpp
msgid "Open Script Editor"
-msgstr "Script Szerkesztő Megnyitása"
+msgstr "Szkript Szerkesztő Megnyitása"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
@@ -2391,7 +2391,7 @@ msgstr "Már létezik szerkesztett jelenet."
#: editor/editor_run_script.cpp
msgid "Couldn't instance script:"
-msgstr "Nem sikerült a script példányosítása:"
+msgstr "Nem sikerült a szkript példányosítása:"
#: editor/editor_run_script.cpp
msgid "Did you forget the 'tool' keyword?"
@@ -2399,7 +2399,7 @@ msgstr "Nem felejtette el a 'tool' kulcsszót?"
#: editor/editor_run_script.cpp
msgid "Couldn't run script:"
-msgstr "Nem sikerült a script futtatása:"
+msgstr "Nem sikerült a szkript futtatása:"
#: editor/editor_run_script.cpp
msgid "Did you forget the '_run' method?"
@@ -2462,14 +2462,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Érvénytelen version.txt formátum a sablonokban."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Érvénytelen version.txt formátum a sablonokban. A revízió nem érvényes "
-"azonosító."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Nem található version.txt a sablonokban."
@@ -2830,20 +2822,20 @@ msgstr "Létrehozás a Következő Hálóhoz: "
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script.."
-msgstr "Tetszőleges Script Futtatása.."
+msgstr "Tetszőleges Szkript Futtatása.."
#: editor/import/resource_importer_scene.cpp
msgid "Couldn't load post-import script:"
-msgstr "Nem sikerült az import utáni script betöltése:"
+msgstr "Nem sikerült az import utáni szkript betöltése:"
#: editor/import/resource_importer_scene.cpp
msgid "Invalid/broken script for post-import (check console):"
msgstr ""
-"Érvénytelen vagy sérült az importálás utáni script (ellenőrizze a konzolt):"
+"Érvénytelen vagy sérült az importálás utáni szkript (ellenőrizze a konzolt):"
#: editor/import/resource_importer_scene.cpp
msgid "Error running post-import script:"
-msgstr "Hiba történt az importálás utána script futtatásakor:"
+msgstr "Hiba történt az importálás utána szkript futtatásakor:"
#: editor/import/resource_importer_scene.cpp
msgid "Saving.."
@@ -4070,102 +4062,103 @@ msgstr "Körvonal Mérete:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and no MultiMesh set in node)."
msgstr ""
+"Nincs háló forrás meghatározva (és nincs MultiMesh a Node-ban beállítva)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and MultiMesh contains no Mesh)."
-msgstr ""
+msgstr "Nincs háló forrás meghatározva (és a MultiMesh nem tartalmaz Mesh-t)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (invalid path)."
-msgstr ""
+msgstr "Mesh forrás érvénytelen (érvénytelen útvonal)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (not a MeshInstance)."
-msgstr ""
+msgstr "Mesh forrás érvénytelen (nem MeshInstance)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (contains no Mesh resource)."
-msgstr ""
+msgstr "Mesh forrás érvénytelen (nem tartalmaz Mesh erőforrást)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No surface source specified."
-msgstr ""
+msgstr "Nincs felületi forrás meghatározva."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Surface source is invalid (invalid path)."
-msgstr ""
+msgstr "Felületi forrás érvénytelen (érvénytelen útvonal)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Surface source is invalid (no geometry)."
-msgstr ""
+msgstr "Felületi forrás érvénytelen (nincs geometria)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Surface source is invalid (no faces)."
-msgstr ""
+msgstr "Felületi forrás érvénytelen (nincsenek oldalak)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Parent has no solid faces to populate."
-msgstr ""
+msgstr "A szülőnek nincsenek kitölthető szilárd oldalai."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Couldn't map area."
-msgstr ""
+msgstr "A területet nem lehetett leképezni."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Source Mesh:"
-msgstr ""
+msgstr "Válasszon Ki Egy Forrás Mesh-t:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Target Surface:"
-msgstr ""
+msgstr "Válasszon Ki Egy Cél Felületet:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate Surface"
-msgstr ""
+msgstr "Felület Kitöltése"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate MultiMesh"
-msgstr ""
+msgstr "MultiMesh Kitöltése"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Target Surface:"
-msgstr ""
+msgstr "Cél Felület:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Source Mesh:"
-msgstr ""
+msgstr "Forrás Mesh:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "X-Axis"
-msgstr ""
+msgstr "X-Tengely"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Y-Axis"
-msgstr ""
+msgstr "Y-Tengely"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Z-Axis"
-msgstr ""
+msgstr "Z-Tengely"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh Up Axis:"
-msgstr ""
+msgstr "Mesh \"Fel\" Tengelye:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Random Rotation:"
-msgstr ""
+msgstr "Véletlenszerű Forgatás:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Random Tilt:"
-msgstr ""
+msgstr "Véletlenszerű Billentés:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Random Scale:"
-msgstr ""
+msgstr "Véletlenszerű Skálázás:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate"
-msgstr ""
+msgstr "Kitöltés"
#: editor/plugins/navigation_mesh_editor_plugin.cpp
msgid "Bake!"
@@ -4177,323 +4170,323 @@ msgstr "A navigációs mesh besütése."
#: editor/plugins/navigation_mesh_editor_plugin.cpp
msgid "Clear the navigation mesh."
-msgstr ""
+msgstr "Navigációs háló törlése."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Setting up Configuration..."
-msgstr ""
+msgstr "Konfiguráció beállítása…"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Calculating grid size..."
-msgstr ""
+msgstr "Rácsméret kiszámítása…"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Creating heightfield..."
-msgstr ""
+msgstr "Magasságmező létrehozása…"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Marking walkable triangles..."
-msgstr ""
+msgstr "Járható háromszögek megjelölése…"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Constructing compact heightfield..."
-msgstr ""
+msgstr "Kompakt magasságmező kiépítése…"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Eroding walkable area..."
-msgstr ""
+msgstr "Járható terület lepusztítása…"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Partitioning..."
-msgstr ""
+msgstr "Particionálás…"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Creating contours..."
-msgstr ""
+msgstr "Kontúrok létrehozása…"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Creating polymesh..."
-msgstr ""
+msgstr "Polymesh létrehozása…"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Converting to native navigation mesh..."
-msgstr ""
+msgstr "Ãtkonvertálás natív navigációs hálóra…"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Navigation Mesh Generator Setup:"
-msgstr ""
+msgstr "Navigációs Háló Generátor Beállítás:"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Parsing Geometry..."
-msgstr ""
+msgstr "Geometria Elemzése…"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Done!"
-msgstr ""
+msgstr "Kész!"
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "Create Navigation Polygon"
-msgstr ""
+msgstr "Navigációs Sokszög Létrehozása"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generating AABB"
-msgstr ""
+msgstr "AABB Generálása"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
-msgstr ""
+msgstr "Csak egy ParticlesMaterial feldolgozó anyagba állíthat pontot"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Error loading image:"
-msgstr ""
+msgstr "Hiba a kép betöltésekor:"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "No pixels with transparency > 128 in image.."
-msgstr ""
+msgstr "Nem létezik egyetlen pixel sem >128-as átlátszósággal a képben.."
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generate Visibility Rect"
-msgstr ""
+msgstr "Láthatósági Téglalap Generálása"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
-msgstr ""
+msgstr "Kibocsátási Maszk Betöltése"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Clear Emission Mask"
-msgstr ""
+msgstr "Kibocsátási Maszk Törlése"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Particles"
-msgstr ""
+msgstr "Részecskék"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
-msgstr ""
+msgstr "Generált Pontok Száma:"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generation Time (sec):"
-msgstr ""
+msgstr "Generálási Idő (mp):"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Emission Mask"
-msgstr ""
+msgstr "Kibocsátási Maszk"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Capture from Pixel"
-msgstr ""
+msgstr "Kinyerés Pixelből"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Emission Colors"
-msgstr ""
+msgstr "Kibocsátási Színek"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Node does not contain geometry."
-msgstr ""
+msgstr "A Node nem tartalmaz geometriát."
#: editor/plugins/particles_editor_plugin.cpp
msgid "Node does not contain geometry (faces)."
-msgstr ""
+msgstr "A Node nem tartalmaz geometriát (oldalakat)."
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
-msgstr ""
+msgstr "Egy 'ParticlesMaterial' típusú feldolgozó anyag szükséges."
#: editor/plugins/particles_editor_plugin.cpp
msgid "Faces contain no area!"
-msgstr ""
+msgstr "Az oldalak nem tartalmaznak területet!"
#: editor/plugins/particles_editor_plugin.cpp
msgid "No faces!"
-msgstr ""
+msgstr "Nincsenek oldalak!"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate AABB"
-msgstr ""
+msgstr "AABB Generálása"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emission Points From Mesh"
-msgstr ""
+msgstr "Kibocsátási Pontok Létrehozása A Mesh Alapján"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emission Points From Node"
-msgstr ""
+msgstr "Kibocsátási Pontok Létrehozása A Node Alapján"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emitter"
-msgstr ""
+msgstr "Kibocsátó Létrehozása"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Points:"
-msgstr ""
+msgstr "Kibocsátási Pontok:"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Surface Points"
-msgstr ""
+msgstr "Felületi Pontok"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Surface Points+Normal (Directed)"
-msgstr ""
+msgstr "Felületi Pontok + Normálok (Irányított)"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Volume"
-msgstr ""
+msgstr "Mennyiség"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Source: "
-msgstr ""
+msgstr "Kibocsátási Forrás: "
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
-msgstr ""
+msgstr "Láthatósági AABB Generálása"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
-msgstr ""
+msgstr "Pont Eltávolítása Görbéről"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Out-Control from Curve"
-msgstr ""
+msgstr "Ki-Vezérlő Eltávolítása Görbéből"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove In-Control from Curve"
-msgstr ""
+msgstr "Be-Vezérlő Eltávolítása Görbéből"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Add Point to Curve"
-msgstr ""
+msgstr "Pont Hozzáadása a Görbéhez"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Move Point in Curve"
-msgstr ""
+msgstr "Pont Mozgatása a Görbén"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Move In-Control in Curve"
-msgstr ""
+msgstr "Be-Vezérlő Mozgatása a Görbén"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Move Out-Control in Curve"
-msgstr ""
+msgstr "Ki-Vezérlő Mozgatása a Görbén"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Select Points"
-msgstr ""
+msgstr "Pontok Kiválasztása"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Shift+Drag: Select Control Points"
-msgstr ""
+msgstr "Shift + Húzás: Vezérlőpontok Kiválasztása"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Click: Add Point"
-msgstr ""
+msgstr "Kattintás: Pont Hozzáadása"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Right Click: Delete Point"
-msgstr ""
+msgstr "Jobb Kattintás: Pont Törlése"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Select Control Points (Shift+Drag)"
-msgstr ""
+msgstr "Vezérlőpontok Kiválasztása (Shift + Húzás)"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Add Point (in empty space)"
-msgstr ""
+msgstr "Pont Hozzáadása (üres helyre)"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Split Segment (in curve)"
-msgstr ""
+msgstr "Szakasz Felosztása (görbén)"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Delete Point"
-msgstr ""
+msgstr "Pont Törlése"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Close Curve"
-msgstr ""
+msgstr "Görbe Lezárása"
#: editor/plugins/path_editor_plugin.cpp
msgid "Curve Point #"
-msgstr ""
+msgstr "Görbe Pont #"
#: editor/plugins/path_editor_plugin.cpp
msgid "Set Curve Point Position"
-msgstr ""
+msgstr "Görbe Pont Pozíció Beállítása"
#: editor/plugins/path_editor_plugin.cpp
msgid "Set Curve In Position"
-msgstr ""
+msgstr "Be-Görbe Pozíció Beállítása"
#: editor/plugins/path_editor_plugin.cpp
msgid "Set Curve Out Position"
-msgstr ""
+msgstr "Ki-Görbe Pozíció Beállítása"
#: editor/plugins/path_editor_plugin.cpp
msgid "Split Path"
-msgstr ""
+msgstr "Útvonal Felosztása"
#: editor/plugins/path_editor_plugin.cpp
msgid "Remove Path Point"
-msgstr ""
+msgstr "Útvonal Pont Eltávolítása"
#: editor/plugins/path_editor_plugin.cpp
msgid "Remove Out-Control Point"
-msgstr ""
+msgstr "Ki-Vezérlő Pont Eltávolítása"
#: editor/plugins/path_editor_plugin.cpp
msgid "Remove In-Control Point"
-msgstr ""
+msgstr "Be-Vezérlő Pont Eltávolítása"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create UV Map"
-msgstr ""
+msgstr "UV Térkép Létrehozása"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Transform UV Map"
-msgstr ""
+msgstr "UV Térkép Transzformálása"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon 2D UV Editor"
-msgstr ""
+msgstr "2D UV Sokszög Szerkesztő"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Move Point"
-msgstr ""
+msgstr "Pont Mozgatása"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Ctrl: Rotate"
-msgstr ""
+msgstr "Ctrl: Forgatás"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Shift: Move All"
-msgstr ""
+msgstr "Shift: Mind Mozgatása"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Shift+Ctrl: Scale"
-msgstr ""
+msgstr "Shift + Ctrl: Skálázás"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Move Polygon"
-msgstr ""
+msgstr "Sokszög Mozgatása"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Rotate Polygon"
-msgstr ""
+msgstr "Sokszög Forgatása"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Scale Polygon"
-msgstr ""
+msgstr "Sokszög Skálázása"
#: editor/plugins/polygon_2d_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
@@ -4505,321 +4498,324 @@ msgstr "Szerkesztés"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon->UV"
-msgstr ""
+msgstr "Sokszög -> UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "UV->Polygon"
-msgstr ""
+msgstr "UV -> Sokszög"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Clear UV"
-msgstr ""
+msgstr "UV Törlése"
#: editor/plugins/polygon_2d_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap"
-msgstr ""
+msgstr "Illesztés"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Enable Snap"
-msgstr ""
+msgstr "Illesztés Engedélyezése"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid"
-msgstr ""
+msgstr "Rács"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "ERROR: Couldn't load resource!"
-msgstr ""
+msgstr "HIBA: Nem sikerült betölteni az erőforrást!"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Add Resource"
-msgstr ""
+msgstr "Erőforrás Hozzáadása"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Rename Resource"
-msgstr ""
+msgstr "ErÅ‘forrás Ãtnevezése"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Delete Resource"
-msgstr ""
+msgstr "Erőforrás Törlése"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Resource clipboard is empty!"
-msgstr ""
+msgstr "Az erőforrás vágólap üres!"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
msgid "Open in Editor"
-msgstr ""
+msgstr "Megnyitás Szerkesztőben"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/scene_tree_editor.cpp
msgid "Instance:"
-msgstr ""
+msgstr "Példány:"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
-msgstr ""
+msgstr "Típus:"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Load Resource"
-msgstr ""
+msgstr "Erőforrás Betöltése"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Paste"
-msgstr ""
+msgstr "Beillesztés"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "ResourcePreloader"
-msgstr ""
+msgstr "ResourcePreloader"
#: editor/plugins/script_editor_plugin.cpp
msgid "Clear Recent Files"
-msgstr ""
+msgstr "Legutóbbi Fájlok Törlése"
#: editor/plugins/script_editor_plugin.cpp
msgid "Close and save changes?"
-msgstr ""
+msgstr "Bezárja és menti a változásokat?"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme"
-msgstr ""
+msgstr "HIba történt a téma mentésekor"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving"
-msgstr ""
+msgstr "Hiba mentés közben"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error importing theme"
-msgstr ""
+msgstr "Hiba történt a téma importálásakor"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error importing"
-msgstr ""
+msgstr "Hiba importáláskor"
#: editor/plugins/script_editor_plugin.cpp
msgid "Import Theme"
-msgstr ""
+msgstr "Téma Importálása"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save Theme As.."
-msgstr ""
+msgstr "Téma Mentése Másként.."
#: editor/plugins/script_editor_plugin.cpp
msgid " Class Reference"
-msgstr ""
+msgstr " Osztály Referencia"
#: editor/plugins/script_editor_plugin.cpp
msgid "Sort"
-msgstr ""
+msgstr "Rendezés"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Move Up"
-msgstr ""
+msgstr "Mozgatás Felfelé"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Move Down"
-msgstr ""
+msgstr "Mozgatás Lefelé"
#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
-msgstr ""
+msgstr "Következő Szkript"
#: editor/plugins/script_editor_plugin.cpp
msgid "Previous script"
-msgstr ""
+msgstr "Előző Szkript"
#: editor/plugins/script_editor_plugin.cpp
msgid "File"
-msgstr ""
+msgstr "Fájl"
#: editor/plugins/script_editor_plugin.cpp
msgid "New"
-msgstr ""
+msgstr "Új"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save All"
-msgstr ""
+msgstr "Összes Mentése"
#: editor/plugins/script_editor_plugin.cpp
msgid "Soft Reload Script"
-msgstr ""
+msgstr "Szkript Puha Újratöltése"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Copy Script Path"
-msgstr "Útvonal másolása"
+msgstr "Szkript Útvonal Másolása"
#: editor/plugins/script_editor_plugin.cpp
msgid "Show In File System"
-msgstr ""
+msgstr "Mutassa a Fájlrendszerben"
#: editor/plugins/script_editor_plugin.cpp
msgid "History Prev"
-msgstr ""
+msgstr "Előző Előzmény"
#: editor/plugins/script_editor_plugin.cpp
msgid "History Next"
-msgstr ""
+msgstr "Következő Előzmény"
#: editor/plugins/script_editor_plugin.cpp
msgid "Reload Theme"
-msgstr ""
+msgstr "Téma Újratöltése"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save Theme"
-msgstr ""
+msgstr "Téma Mentése"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save Theme As"
-msgstr ""
+msgstr "Téma Mentése Másként"
#: editor/plugins/script_editor_plugin.cpp
msgid "Close Docs"
-msgstr ""
+msgstr "Dokumentációs Lapok Bezárása"
#: editor/plugins/script_editor_plugin.cpp
msgid "Close All"
-msgstr ""
+msgstr "Mind Bezárása"
#: editor/plugins/script_editor_plugin.cpp
msgid "Close Other Tabs"
-msgstr ""
+msgstr "A Többi Lap Bezárása"
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
msgid "Run"
-msgstr ""
+msgstr "Futtatás"
#: editor/plugins/script_editor_plugin.cpp
msgid "Toggle Scripts Panel"
-msgstr ""
+msgstr "Szkript Panel Megjelenítése"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find.."
-msgstr ""
+msgstr "Keresés.."
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find Next"
-msgstr ""
+msgstr "Következő Keresése"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Over"
-msgstr ""
+msgstr "Ãtlépés"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Into"
-msgstr ""
+msgstr "Belépés"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Break"
-msgstr ""
+msgstr "Szünet"
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
#: editor/script_editor_debugger.cpp
msgid "Continue"
-msgstr ""
+msgstr "Folytatás"
#: editor/plugins/script_editor_plugin.cpp
msgid "Keep Debugger Open"
-msgstr ""
+msgstr "Hibakereső Nyitva Tartása"
#: editor/plugins/script_editor_plugin.cpp
msgid "Debug with external editor"
-msgstr ""
+msgstr "Hibakeresés külső szerkesztővel"
#: editor/plugins/script_editor_plugin.cpp
msgid "Open Godot online documentation"
-msgstr ""
+msgstr "Godot online dokumentáció megnyitása"
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the class hierarchy."
-msgstr ""
+msgstr "Keresés az osztályhierarchiában."
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the reference documentation."
-msgstr ""
+msgstr "Keresés a referencia dokumentációban."
#: editor/plugins/script_editor_plugin.cpp
msgid "Go to previous edited document."
-msgstr ""
+msgstr "Ugrás az előzőleg szerkesztett dokumentumra."
#: editor/plugins/script_editor_plugin.cpp
msgid "Go to next edited document."
-msgstr ""
+msgstr "Ugrás a következőleg szerkesztett dokumentumra."
#: editor/plugins/script_editor_plugin.cpp
msgid "Discard"
-msgstr ""
+msgstr "Elvetés"
#: editor/plugins/script_editor_plugin.cpp
msgid "Create Script"
-msgstr ""
+msgstr "Szkript Létrehozása"
#: editor/plugins/script_editor_plugin.cpp
msgid ""
"The following files are newer on disk.\n"
"What action should be taken?:"
msgstr ""
+"A alábbi fájlok újabbak a lemezen.\n"
+"Mit szeretne lépni?:"
#: editor/plugins/script_editor_plugin.cpp
msgid "Reload"
-msgstr ""
+msgstr "Újratöltés"
#: editor/plugins/script_editor_plugin.cpp
msgid "Resave"
-msgstr ""
+msgstr "Újramentés"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
-msgstr ""
+msgstr "Hibakereső"
#: editor/plugins/script_editor_plugin.cpp
msgid ""
"Built-in scripts can only be edited when the scene they belong to is loaded"
msgstr ""
+"A beépített szkriptek csak akkor szerkeszthetőek, amikor az a jelenet, "
+"amihez tartoznak, éppen be van töltve"
#: editor/plugins/script_text_editor.cpp
msgid "Only resources from filesystem can be dropped."
-msgstr ""
+msgstr "Csak a fájlrendszerből eredő erőforrásokat lehet bedobni."
#: editor/plugins/script_text_editor.cpp
msgid "Pick Color"
-msgstr ""
+msgstr "Szín Választása"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Case"
-msgstr ""
+msgstr "Kis- és Nagybetűk Konvertálása"
#: editor/plugins/script_text_editor.cpp
msgid "Uppercase"
-msgstr ""
+msgstr "Mind Nagybetű"
#: editor/plugins/script_text_editor.cpp
msgid "Lowercase"
-msgstr ""
+msgstr "Mind Kisbetű"
#: editor/plugins/script_text_editor.cpp
msgid "Capitalize"
-msgstr ""
+msgstr "Szó Eleji Nagybetű"
#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
msgid "Cut"
-msgstr ""
+msgstr "Kivágás"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
@@ -4830,59 +4826,59 @@ msgstr "Másolás"
#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
msgid "Select All"
-msgstr ""
+msgstr "Összes Kijelölése"
#: editor/plugins/script_text_editor.cpp
msgid "Delete Line"
-msgstr ""
+msgstr "Sor Törlése"
#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
-msgstr ""
+msgstr "Behúzás Balra"
#: editor/plugins/script_text_editor.cpp
msgid "Indent Right"
-msgstr ""
+msgstr "Behúzás Jobbra"
#: editor/plugins/script_text_editor.cpp
msgid "Toggle Comment"
-msgstr ""
+msgstr "Ãtváltás Megjegyzésre"
#: editor/plugins/script_text_editor.cpp
msgid "Fold/Unfold Line"
-msgstr ""
+msgstr "Sor Összezárása / Kibontása"
#: editor/plugins/script_text_editor.cpp
msgid "Fold All Lines"
-msgstr ""
+msgstr "Összes Sor Összezárása"
#: editor/plugins/script_text_editor.cpp
msgid "Unfold All Lines"
-msgstr ""
+msgstr "Összes Sor Kibontása"
#: editor/plugins/script_text_editor.cpp
msgid "Clone Down"
-msgstr ""
+msgstr "Klónozás Lefelé"
#: editor/plugins/script_text_editor.cpp
msgid "Complete Symbol"
-msgstr ""
+msgstr "Szimbólum Befejezése"
#: editor/plugins/script_text_editor.cpp
msgid "Trim Trailing Whitespace"
-msgstr ""
+msgstr "Sorvégi Szóközök Lenyírása"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Spaces"
-msgstr ""
+msgstr "Behúzások Ãtkonvertálása Szóközökre"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Tabs"
-msgstr ""
+msgstr "Behúzások Ãtkonvertálása Tabokra"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
-msgstr ""
+msgstr "Automatikus Behúzás"
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -4891,47 +4887,47 @@ msgstr "Töréspont Elhelyezése"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Breakpoints"
-msgstr ""
+msgstr "Összes Töréspont Eltávolítása"
#: editor/plugins/script_text_editor.cpp
msgid "Goto Next Breakpoint"
-msgstr ""
+msgstr "Ugrás Következő Töréspontra"
#: editor/plugins/script_text_editor.cpp
msgid "Goto Previous Breakpoint"
-msgstr ""
+msgstr "Ugrás Előző Töréspontra"
#: editor/plugins/script_text_editor.cpp
msgid "Convert To Uppercase"
-msgstr ""
+msgstr "Konvertálás Nagybetűsre"
#: editor/plugins/script_text_editor.cpp
msgid "Convert To Lowercase"
-msgstr ""
+msgstr "Konvertálás Kisbetűsre"
#: editor/plugins/script_text_editor.cpp
msgid "Find Previous"
-msgstr ""
+msgstr "Előző Keresése"
#: editor/plugins/script_text_editor.cpp
msgid "Replace.."
-msgstr ""
+msgstr "Csere.."
#: editor/plugins/script_text_editor.cpp
msgid "Goto Function.."
-msgstr ""
+msgstr "Ugrás Funkcióra.."
#: editor/plugins/script_text_editor.cpp
msgid "Goto Line.."
-msgstr ""
+msgstr "Ugrás Sorra.."
#: editor/plugins/script_text_editor.cpp
msgid "Contextual Help"
-msgstr ""
+msgstr "Kontextusérzékeny Súgó"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
-msgstr ""
+msgstr "Shader"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Constant"
@@ -6022,9 +6018,8 @@ msgid "Create New Project"
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Create & Edit"
-msgstr "Létrehozás"
+msgstr "Létrehozás és Szerkesztés"
#: editor/project_manager.cpp
msgid "Install Project:"
@@ -6687,9 +6682,8 @@ msgid "Error duplicating scene to save it."
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Sub-Resources"
-msgstr "Forrás másolása"
+msgstr "Al-Erőforrások"
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance"
@@ -6980,9 +6974,8 @@ msgid "Child Process Connected"
msgstr ""
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Copy Error"
-msgstr "Póz másolása"
+msgstr "Hiba Másolása"
#: editor/script_editor_debugger.cpp
msgid "Inspect Previous Instance"
@@ -7137,9 +7130,8 @@ msgid "Select dependencies of the library for this entry"
msgstr ""
#: modules/gdnative/gdnative_library_editor_plugin.cpp
-#, fuzzy
msgid "Remove current entry"
-msgstr "Jelenlegi nyomvonal felfelé mozgatása."
+msgstr "Jelenlegi tétel eltávolítása"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Double click to create a new entry"
@@ -7229,14 +7221,12 @@ msgid "Object can't provide a length."
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "Következő fül"
+msgstr "Következő Sík"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "Előző fül"
+msgstr "Előző Sík"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
@@ -7394,6 +7384,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8072,6 +8066,13 @@ msgstr "Hiba a betűtípus betöltésekor."
msgid "Invalid font size."
msgstr "Érvénytelen betűtípus méret."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Érvénytelen version.txt formátum a sablonokban. A revízió nem érvényes "
+#~ "azonosító."
+
#~ msgid "Can't write file."
#~ msgstr "Nem lehet fájlt írni."
diff --git a/editor/translations/id.po b/editor/translations/id.po
index cb17c0a2a3..df10490482 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -10,22 +10,22 @@
# Damar S. M <the.last.walla@gmail.com>, 2017.
# Khairul Hidayat <khairulcyber4rt@gmail.com>, 2016.
# Romi Kusuma Bakti <romikusumab@gmail.com>, 2017.
-# Sofyan Sugianto <sofyanartem@gmail.com>, 2017.
+# Sofyan Sugianto <sofyanartem@gmail.com>, 2017-2018.
# Tom My <tom.asadinawan@gmail.com>, 2017.
# yursan9 <rizal.sagi@gmail.com>, 2016.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-12-11 10:47+0000\n"
-"Last-Translator: Romi Kusuma Bakti <romikusumab@gmail.com>\n"
+"PO-Revision-Date: 2018-03-02 01:38+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"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 2.18-dev\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -36,9 +36,8 @@ msgid "All Selection"
msgstr "Semua pilihan"
#: editor/animation_editor.cpp
-#, fuzzy
msgid "Anim Change Keyframe Time"
-msgstr "Ubah Nilai Animasi"
+msgstr "Ubah Waktu Keyframe Animasi"
#: editor/animation_editor.cpp
msgid "Anim Change Transition"
@@ -49,9 +48,8 @@ msgid "Anim Change Transform"
msgstr "Ubah Transformasi Animasi"
#: editor/animation_editor.cpp
-#, fuzzy
msgid "Anim Change Keyframe Value"
-msgstr "Ubah Nilai Animasi"
+msgstr "Ubah Nilai Keyframe Animasi"
#: editor/animation_editor.cpp
msgid "Anim Change Call"
@@ -99,7 +97,7 @@ msgstr "Ubah Trek Anim ke Wrap Mode"
#: editor/animation_editor.cpp
msgid "Edit Node Curve"
-msgstr "Edit Kurva Node"
+msgstr "Sunting Kurva Node"
#: editor/animation_editor.cpp
msgid "Edit Selection Curve"
@@ -380,9 +378,8 @@ msgid "No Matches"
msgstr "Tidak ada yang cocok"
#: editor/code_editor.cpp
-#, fuzzy
msgid "Replaced %d occurrence(s)."
-msgstr "Diganti kejadian (kejadian-kejadian) %d."
+msgstr "%d kejadian diganti."
#: editor/code_editor.cpp
msgid "Match Case"
@@ -504,9 +501,8 @@ msgid "Connecting Signal:"
msgstr "Menyambungkan Sinyal:"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Disconnect '%s' from '%s'"
-msgstr "Sambungkan '%s' ke '%s'"
+msgstr "Memutuskan '%s' dari '%s'"
#: editor/connections_dialog.cpp
msgid "Connect.."
@@ -522,9 +518,8 @@ msgid "Signals"
msgstr "Sinyal-sinyal"
#: editor/create_dialog.cpp
-#, fuzzy
msgid "Change %s Type"
-msgstr "Ubah Tipe Nilai Array"
+msgstr "Ubah Tipe %s"
#: editor/create_dialog.cpp editor/project_settings_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -532,9 +527,8 @@ msgid "Change"
msgstr "Ubah"
#: editor/create_dialog.cpp
-#, fuzzy
msgid "Create New %s"
-msgstr "Buat Baru"
+msgstr "Buat Baru %s"
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -612,9 +606,8 @@ msgid "Fix Broken"
msgstr "Perbaiki yang Rusak"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Dependency Editor"
-msgstr "Editor Ketergantungan"
+msgstr "Penyunting Dependensi"
#: editor/dependency_editor.cpp
msgid "Search Replacement Resource:"
@@ -647,9 +640,8 @@ msgstr ""
"Hapus saja? (tidak bisa dibatalkan/undo)"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Cannot remove:"
-msgstr "Tidak bisa dibuang:\n"
+msgstr "Tidak bisa menghapus:"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -710,7 +702,7 @@ msgstr "Ubah Kunci Kamus"
#: editor/dictionary_property_edit.cpp
#, fuzzy
msgid "Change Dictionary Value"
-msgstr "Ubah Nilai Array"
+msgstr "Ubah Nilai Dictionary"
#: editor/editor_about.cpp
msgid "Thanks from the Godot community!"
@@ -733,9 +725,8 @@ msgid "Lead Developer"
msgstr "Pengembang Utama"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Project Manager "
-msgstr "Manajer Proyek"
+msgstr "Manajer Proyek "
#: editor/editor_about.cpp
msgid "Developers"
@@ -794,14 +785,12 @@ msgstr ""
"lisensi masing-masing."
#: editor/editor_about.cpp
-#, fuzzy
msgid "All Components"
-msgstr "Konstanta:"
+msgstr "Semua Komponen"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Components"
-msgstr "Konstanta:"
+msgstr "Komponen"
#: editor/editor_about.cpp
msgid "Licenses"
@@ -812,9 +801,8 @@ msgid "Error opening package file, not in zip format."
msgstr "Gagal saat membuka paket, tidak dalam bentuk zip."
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Uncompressing Assets"
-msgstr "Mengimpor ulang"
+msgstr "Membuka Aset Terkompresi"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Package Installed Successfully!"
@@ -843,14 +831,12 @@ msgid "Add Effect"
msgstr "Tambahkan Efek"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Rename Audio Bus"
-msgstr "Namai kembali Autoload"
+msgstr "Ubah Nama Bus Audio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Change Audio Bus Volume"
-msgstr "Alih Audio Bus Solo"
+msgstr "Ubah Volume Bus Audio"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Solo"
@@ -877,9 +863,8 @@ msgid "Move Bus Effect"
msgstr "Pindah Efek Bus"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Delete Bus Effect"
-msgstr "Hapus yang Dipilih"
+msgstr "Hapus Effect Bus"
#: editor/editor_audio_buses.cpp
msgid "Audio Bus, Drag and Drop to rearrange."
@@ -907,18 +892,16 @@ msgid "Duplicate"
msgstr "Gandakan"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Volume"
-msgstr "Kebalikan Semula Pandangan"
+msgstr "Setel Ulang Volume"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Delete Effect"
-msgstr "Hapus yang Dipilih"
+msgstr "Hapus Efek"
#: editor/editor_audio_buses.cpp
msgid "Audio"
-msgstr ""
+msgstr "Suara"
#: editor/editor_audio_buses.cpp
msgid "Add Audio Bus"
@@ -931,22 +914,20 @@ msgstr "Master Bus tidak dapat dihapus!"
#: editor/editor_audio_buses.cpp
#, fuzzy
msgid "Delete Audio Bus"
-msgstr "Hapus Penampilan"
+msgstr "Hapus Bus Audio"
#: editor/editor_audio_buses.cpp
#, fuzzy
msgid "Duplicate Audio Bus"
-msgstr "Duplikat Pilihan"
+msgstr "Duplikat Audio Bus"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Bus Volume"
-msgstr "Kebalikan Semula Pandangan"
+msgstr "Setel Ulang Bus Volume"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Move Audio Bus"
-msgstr "Pindahkan Kunci Tambah"
+msgstr "Pindahkan Audio Bus"
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
@@ -997,7 +978,7 @@ msgstr "Simpan Layout Bus ke berkas."
#: editor/editor_audio_buses.cpp editor/import_dock.cpp
#, fuzzy
msgid "Load Default"
-msgstr "Bawaan"
+msgstr "Muat Konfigurasi Bawaan"
#: editor/editor_audio_buses.cpp
msgid "Load the default Bus Layout."
@@ -1012,9 +993,9 @@ msgid "Valid characters:"
msgstr "Karakter sah:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Invalid name. Must not collide with an existing engine class name."
-msgstr "Nama tidak sah. Harus tidak serupa dengan class name engine yang ada."
+msgstr ""
+"Nama tidak valid. Tidak boleh sama dengan nama kelas bawaan engine yang ada."
#: editor/editor_autoload_settings.cpp
msgid "Invalid name. Must not collide with an existing buit-in type name."
@@ -1062,7 +1043,6 @@ msgid "Remove Autoload"
msgstr "Hapus Autoload"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Enable"
msgstr "Aktifkan"
@@ -1102,16 +1082,16 @@ msgstr "Memperbaharui scene.."
#: editor/editor_data.cpp
msgid "[empty]"
-msgstr ""
+msgstr "[kosong]"
#: editor/editor_data.cpp
msgid "[unsaved]"
-msgstr ""
+msgstr "[belum disimpan]"
#: editor/editor_dir_dialog.cpp
#, fuzzy
msgid "Please select a base directory first"
-msgstr "Mohon simpan scene terlebih dahulu."
+msgstr "Pilih direktori kerja terlebih dahulu"
#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
@@ -1147,31 +1127,28 @@ msgid "Packing"
msgstr "Mengemas"
#: editor/editor_export.cpp platform/javascript/export/export.cpp
-#, fuzzy
msgid "Template file not found:"
-msgstr "Template berkas tidak ditemukan:\n"
+msgstr "Templat berkas tidak ditemukan:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "File Exists, Overwrite?"
msgstr "File telah ada, Overwrite?"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Select Current Folder"
-msgstr "Buat Folder"
+msgstr "Pilih Folder Saat Ini"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "Copy Path"
-msgstr ""
+msgstr "Salin Lokasi"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "Show In File Manager"
msgstr "Tampilkan di Manajer Berkas"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Folder.."
-msgstr "Buat Folder"
+msgstr "Buat Direktori..."
#: editor/editor_file_dialog.cpp
msgid "Refresh"
@@ -1212,17 +1189,14 @@ msgid "Save a File"
msgstr "Simpan sebuah File"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go Back"
-msgstr "Mundur"
+msgstr "Kembali"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go Forward"
msgstr "Maju"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go Up"
msgstr "Naik"
@@ -1251,9 +1225,8 @@ msgid "Move Favorite Down"
msgstr "Pindahkan Favorit Kebawah"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Go to parent folder"
-msgstr "Tidak dapat membuat folder."
+msgstr "Pergi ke direktori induk"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
@@ -1277,9 +1250,8 @@ msgid "ScanSources"
msgstr "Sumber Pemindaian"
#: editor/editor_file_system.cpp
-#, fuzzy
msgid "(Re)Importing Assets"
-msgstr "Mengimpor ulang"
+msgstr "Mengimpor ulang Aset"
#: editor/editor_help.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -1315,9 +1287,8 @@ msgid "Brief Description:"
msgstr "Deskripsi Singkat:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Members"
-msgstr "Member-member:"
+msgstr "Anggota"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
msgid "Members:"
@@ -1326,7 +1297,7 @@ msgstr "Member-member:"
#: editor/editor_help.cpp
#, fuzzy
msgid "Public Methods"
-msgstr "Metode Publik:"
+msgstr "Fungsi Publik"
#: editor/editor_help.cpp
msgid "Public Methods:"
@@ -1346,57 +1317,50 @@ msgid "Signals:"
msgstr "Sinyal-sinyal:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Enumerations"
-msgstr "Fungsi-fungsi:"
+msgstr "Enumerasi"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Enumerations:"
-msgstr "Fungsi-fungsi:"
+msgstr "Enumerasi:"
#: editor/editor_help.cpp
msgid "enum "
-msgstr ""
+msgstr "enum "
#: editor/editor_help.cpp
-#, fuzzy
msgid "Constants"
-msgstr "Konstanta:"
+msgstr "Konstanta"
#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Konstanta:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Description"
-msgstr "Deskripsi:"
+msgstr "Deskripsi"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Online Tutorials:"
-msgstr "Online Dokumentasi"
+msgstr "Tutorial Daring:"
#: editor/editor_help.cpp
-#, fuzzy
msgid ""
"There are currently no tutorials for this class, you can [color=$color][url="
"$url]contribute one[/url][/color] or [color=$color][url=$url2]request one[/"
"url][/color]."
msgstr ""
-"Untuk saat ini tidak ada deskripsi metode ini. Tolong bantu kita dengan "
-"[color=$color][url=$url]kontribusi[/url][/color]!"
+"Untuk saat ini tidak ada tutorial dalam kelas ini, anda bisa [color=$color]"
+"[url=$url]ikut berkontribusi[/url][/color] atau [color=$color][url="
+"$url2]memberikan usulan[/url][/color]."
#: editor/editor_help.cpp
-#, fuzzy
msgid "Properties"
-msgstr "Properti Objek."
+msgstr "Properti Objek"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Property Description:"
-msgstr "Deskripsi Singkat:"
+msgstr "Deskripsi Properti Objek:"
#: editor/editor_help.cpp
msgid ""
@@ -1407,9 +1371,8 @@ msgstr ""
"dengan[color=$color][url=$url]kontribusi[/url][/color]!"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Methods"
-msgstr "Daftar Fungsi:"
+msgstr "Fungsi"
#: editor/editor_help.cpp
msgid "Method Description:"
@@ -1432,9 +1395,8 @@ msgid "Find"
msgstr "Cari"
#: editor/editor_log.cpp
-#, fuzzy
msgid "Output:"
-msgstr " Keluaran:"
+msgstr "Keluaran:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
#: editor/property_editor.cpp editor/script_editor_debugger.cpp
@@ -1444,9 +1406,8 @@ msgid "Clear"
msgstr "Bersihkan"
#: editor/editor_log.cpp
-#, fuzzy
msgid "Clear Output"
-msgstr "Luaran"
+msgstr "Bersihkan Luaran"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Error saving resource!"
@@ -1475,28 +1436,24 @@ msgid "Error while saving."
msgstr "Error saat menyimpan."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Can't open '%s'."
-msgstr "Menyambungkan.."
+msgstr "Tidak dapat membuka '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while parsing '%s'."
-msgstr "Error saat menyimpan."
+msgstr "Kesalahan saat melakukan parsing '%s'."
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
msgstr "akhir dari berkas tak terduga '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Missing '%s' or its dependencies."
-msgstr "Scene '%s' memiliki dependensi yang rusak:"
+msgstr "'%s' hilang atau memiliki dependensi yang rusak."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while loading '%s'."
-msgstr "Error saat menyimpan."
+msgstr "Terjadi kesalahan saat memuat '%s'."
#: editor/editor_node.cpp
msgid "Saving Scene"
@@ -1513,15 +1470,15 @@ msgstr "Membuat Thumbnail"
#: editor/editor_node.cpp
#, fuzzy
msgid "This operation can't be done without a tree root."
-msgstr "Tindakan ini tidak dapat dibatalkan. Pulihkan saja?"
+msgstr "Tindakan ini tidak bisa dilakukan tanpa \"tree root\""
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"Couldn't save scene. Likely dependencies (instances or inheritance) couldn't "
"be satisfied."
msgstr ""
-"Tidak dapat menyimpan scene. Dependensi (instance) mungkin tidak terpenuhi."
+"Tidak dapat menyimpan scene. Dependensi (instance atau turunannya) mungkin "
+"tidak terpenuhi."
#: editor/editor_node.cpp
msgid "Failed to load resource."
@@ -1532,9 +1489,8 @@ msgid "Can't load MeshLibrary for merging!"
msgstr "Tidak dapat memuat MeshLibrary untuk menggabungkan!"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error saving MeshLibrary!"
-msgstr "Error menyimpan MeshLibrary!"
+msgstr "Terjadi kesalahan saat menyimpan MeshLibrary!"
#: editor/editor_node.cpp
msgid "Can't load TileSet for merging!"
@@ -1650,15 +1606,14 @@ msgid "There is no defined scene to run."
msgstr "Tidak ada definisi scene untuk dijalankan."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"No main scene has ever been defined, select one?\n"
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
"Tidak ada scene utama yang pernah didefinisikan, pilih satu?\n"
-"Anda dapat mengubahnya nanti di akhir dalam \"Project Settings\" dibawah "
-"kategori 'application'."
+"Anda dapat mengubahnya nanti di \"Project Settings\" di bawah kategori "
+"'application'."
#: editor/editor_node.cpp
msgid ""
@@ -1707,9 +1662,8 @@ msgid "Quick Open Script.."
msgstr "Buka Cepat Script.."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save & Close"
-msgstr "Simpan sebuah File"
+msgstr "Simpan & Tutup"
#: editor/editor_node.cpp
msgid "Save changes to '%s' before closing?"
@@ -1740,9 +1694,8 @@ msgid "Export Mesh Library"
msgstr "Ekspor Mesh Library"
#: editor/editor_node.cpp
-#, fuzzy
msgid "This operation can't be done without a root node."
-msgstr "Tindakan ini tidak dapat dibatalkan. Pulihkan saja?"
+msgstr "Tindakan ini tidak bisa dilakukan tanpa node dasar."
#: editor/editor_node.cpp
msgid "Export Tile Set"
@@ -1785,19 +1738,16 @@ msgid "Open Project Manager?"
msgstr "Buka Project Manager?"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save & Quit"
-msgstr "Simpan sebuah File"
+msgstr "Simpan & Keluar"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save changes to the following scene(s) before quitting?"
-msgstr "Simpan perubahan saat ini sebelum keluar?"
+msgstr "Simpan perubahan scene saat ini sebelum keluar?"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save changes the following scene(s) before opening Project Manager?"
-msgstr "Simpan perubahan saat ini sebelum membuka Manajer Projek?"
+msgstr "Simpan perubahan scene saat ini sebelum membuka Manajer Projek?"
#: editor/editor_node.cpp
msgid ""
@@ -1823,9 +1773,8 @@ msgstr ""
"Tidak dapat mencari bidang script untuk addon plugin pada: 'res://addons/%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Unable to load addon script from path: '%s'."
-msgstr "Error memuat font."
+msgstr "Tidak bisa memuat script addon dari lokasi: '%s'."
#: editor/editor_node.cpp
msgid ""
@@ -1887,17 +1836,14 @@ msgid "Switch Scene Tab"
msgstr "Pilih Tab Scene"
#: editor/editor_node.cpp
-#, fuzzy
msgid "%d more files or folders"
msgstr "%d file atau folder lagi"
#: editor/editor_node.cpp
-#, fuzzy
msgid "%d more folders"
-msgstr "%d file lagi"
+msgstr "%d folder lagi"
#: editor/editor_node.cpp
-#, fuzzy
msgid "%d more files"
msgstr "%d file lagi"
@@ -1915,9 +1861,8 @@ msgid "Toggle distraction-free mode."
msgstr "Mode Tanpa Gangguan"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Add a new scene."
-msgstr "Tambah tracks baru."
+msgstr "Tambah scene baru."
#: editor/editor_node.cpp
msgid "Scene"
@@ -2117,9 +2062,8 @@ msgstr ""
"jaringan filesystem."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor"
-msgstr "Edit"
+msgstr "Editor"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -2130,14 +2074,12 @@ msgid "Editor Layout"
msgstr "Tata Letak Editor"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Toggle Fullscreen"
msgstr "Mode Layar Penuh"
#: editor/editor_node.cpp editor/project_export.cpp
-#, fuzzy
msgid "Manage Export Templates"
-msgstr "Memuat Ekspor Template-template."
+msgstr "Mengatur Templat Ekspor"
#: editor/editor_node.cpp
msgid "Help"
@@ -2145,7 +2087,7 @@ msgstr "Bantuan"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Classes"
-msgstr ""
+msgstr "Kelas"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -2160,7 +2102,7 @@ msgstr "Online Dokumentasi"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "Tanya Jawab"
#: editor/editor_node.cpp
msgid "Issue Tracker"
@@ -2184,11 +2126,11 @@ msgstr "Mainkan"
#: editor/editor_node.cpp
msgid "Pause the scene"
-msgstr ""
+msgstr "Hentikan sementara scene ini"
#: editor/editor_node.cpp
msgid "Pause Scene"
-msgstr ""
+msgstr "Hentikan Sementara Scene"
#: editor/editor_node.cpp
msgid "Stop the scene."
@@ -2276,9 +2218,8 @@ msgid "Import"
msgstr "Impor"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Node"
-msgstr "Titik"
+msgstr ""
#: editor/editor_node.cpp
msgid "FileSystem"
@@ -2293,7 +2234,6 @@ msgid "Don't Save"
msgstr "Jangan Simpan"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Import Templates From ZIP File"
msgstr "Impor Templat dari Berkas ZIP"
@@ -2306,7 +2246,6 @@ msgid "Export Library"
msgstr "Ekspor Pustaka"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Merge With Existing"
msgstr "Gabung dengan yang Ada"
@@ -2319,12 +2258,10 @@ msgid "Open & Run a Script"
msgstr "Buka & Jalankan Skrip"
#: editor/editor_node.cpp
-#, fuzzy
msgid "New Inherited"
-msgstr "Scene Turunan Baru.."
+msgstr "Turunan Baru"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Load Errors"
msgstr "Muat Galat"
@@ -2333,12 +2270,10 @@ msgid "Select"
msgstr "Pilih"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 2D Editor"
msgstr "Buka Penyunting 2D"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 3D Editor"
msgstr "Buka Penyunting 3D"
@@ -2385,7 +2320,7 @@ msgstr "Pembuat:"
#: editor/editor_plugin_settings.cpp
msgid "Status:"
-msgstr ""
+msgstr "Status:"
#: editor/editor_profiler.cpp
msgid "Stop Profiling"
@@ -2432,12 +2367,10 @@ msgid "Frame #:"
msgstr "Bingkai #:"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Time"
-msgstr "Waktu:"
+msgstr "Waktu"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Calls"
msgstr "Panggil"
@@ -2450,79 +2383,80 @@ msgid ""
"No runnable export preset found for this platform.\n"
"Please add a runnable preset in the export menu."
msgstr ""
+"Tidak ada preset ekspor yang bisa digunakan untuk platform ini.\n"
+"Mohon tambahkan preset yang bisa digunakan di menu ekspor."
#: editor/editor_run_script.cpp
msgid "Write your logic in the _run() method."
-msgstr ""
+msgstr "Tulis logika di dalam fungsi _run()."
#: editor/editor_run_script.cpp
msgid "There is an edited scene already."
-msgstr ""
+msgstr "Ada scene yang disunting."
#: editor/editor_run_script.cpp
msgid "Couldn't instance script:"
-msgstr ""
+msgstr "Tidak bisa meng-instance script:"
#: editor/editor_run_script.cpp
msgid "Did you forget the 'tool' keyword?"
-msgstr ""
+msgstr "Apakah anda lupa dengan kata kunci 'tool'?"
#: editor/editor_run_script.cpp
msgid "Couldn't run script:"
-msgstr ""
+msgstr "Tidak bisa menjalankan script:"
#: editor/editor_run_script.cpp
msgid "Did you forget the '_run' method?"
-msgstr ""
+msgstr "Apakah anda lupa dengan fungsi '_run' ?"
#: editor/editor_settings.cpp
msgid "Default (Same as Editor)"
-msgstr ""
+msgstr "Baku (Samakan seperti Penyunting saat ini)"
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
-msgstr ""
+msgstr "Pilih node untuk diimpor"
#: editor/editor_sub_scene.cpp
msgid "Scene Path:"
-msgstr ""
+msgstr "Lokasi Scene:"
#: editor/editor_sub_scene.cpp
msgid "Import From Node:"
-msgstr ""
+msgstr "Impor dari Node:"
#: editor/export_template_manager.cpp
msgid "Re-Download"
-msgstr ""
+msgstr "Unduh Ulang"
#: editor/export_template_manager.cpp
msgid "Uninstall"
-msgstr ""
+msgstr "Copot Pemasangan"
#: editor/export_template_manager.cpp
msgid "(Installed)"
-msgstr ""
+msgstr "(terpasang)"
#: editor/export_template_manager.cpp
msgid "Download"
-msgstr ""
+msgstr "Unduh"
#: editor/export_template_manager.cpp
msgid "(Missing)"
-msgstr ""
+msgstr "(hilang)"
#: editor/export_template_manager.cpp
msgid "(Current)"
-msgstr ""
+msgstr "(Kondisi Saat Ini)"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Retrieving mirrors, please wait.."
-msgstr "Gangguan koneks, silakan coba lagi."
+msgstr "Mendapatkan informasi cermin, silakan tunggu.."
#: editor/export_template_manager.cpp
msgid "Remove template version '%s'?"
-msgstr ""
+msgstr "Hapus templat versi '%s'?"
#: editor/export_template_manager.cpp
msgid "Can't open export templates zip."
@@ -2530,27 +2464,19 @@ msgstr "Tidak dapat membuka ekspor template-template zip."
#: editor/export_template_manager.cpp
msgid "Invalid version.txt format inside templates."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
+msgstr "Format version.txt tidak valid dalam berkas templat."
#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
-msgstr ""
+msgstr "Berkas version.txt tidak ditemukan dalam templat."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for templates:"
-msgstr "Gagal menyimpan atlas:"
+msgstr "Kesalahan saat membuat lokasi untuk templat:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Extracting Export Templates"
-msgstr "Memuat Ekspor Template-template."
+msgstr "Mengekstrak Berkas Templat Ekspor"
#: editor/export_template_manager.cpp
msgid "Importing:"
@@ -2561,17 +2487,18 @@ msgid ""
"No download links found for this version. Direct download is only available "
"for official releases."
msgstr ""
+"Tautan unduh tidak ditemukan untuk versi ini. Unduhan langsung hanya "
+"tersedia untuk versi rilis resmi."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr ""
+msgstr "Tidak bisa menyelesaikan."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "Menyambungkan.."
+msgstr "Tidak dapat terhubung."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -2580,9 +2507,8 @@ msgstr "Tidak ada respon."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request Failed."
-msgstr "Menguji"
+msgstr "Permintaan Gagal."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -2592,26 +2518,23 @@ msgstr ""
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "Gagal:"
#: editor/export_template_manager.cpp
msgid "Download Complete."
-msgstr ""
+msgstr "Unduhan Selesai."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error requesting url: "
-msgstr "Gagal menyimpan atlas:"
+msgstr "Kesalahan saat meminta url: "
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connecting to Mirror.."
msgstr "Menyambungkan.."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Disconnected"
-msgstr "Tidak tersambung"
+msgstr "Terputus"
#: editor/export_template_manager.cpp
msgid "Resolving"
@@ -2623,160 +2546,146 @@ msgstr ""
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting.."
msgstr "Menyambungkan.."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't Connect"
-msgstr "Menyambungkan.."
+msgstr "Tidak dapat terhubung"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connected"
-msgstr "Menghubungkan"
+msgstr "Terhubung"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "Menguji"
+msgstr "Melakukan permintaan.."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Downloading"
-msgstr "Error memuat:"
+msgstr "Mengunduh"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connection Error"
-msgstr "Menyambungkan.."
+msgstr "Gangguan Koneksi"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "SSL Handshake Error"
-msgstr "Muat Galat"
+msgstr "Kesalahan jabat tangan SSL"
#: editor/export_template_manager.cpp
msgid "Current Version:"
-msgstr ""
+msgstr "Versi sekarang:"
#: editor/export_template_manager.cpp
msgid "Installed Versions:"
-msgstr ""
+msgstr "Versi Terpasang:"
#: editor/export_template_manager.cpp
msgid "Install From File"
-msgstr ""
+msgstr "Memasang dari berkas"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove Template"
-msgstr "Hapus Pilihan"
+msgstr "Hapus Templat"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Select template file"
-msgstr "Hapus file yang dipilih?"
+msgstr "Pilih berkas templat"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Export Template Manager"
-msgstr "Memuat Ekspor Template-template."
+msgstr "Manajer Templat Ekspor"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download Templates"
-msgstr "Hapus Pilihan"
+msgstr "Unduh Templat"
#: editor/export_template_manager.cpp
msgid "Select mirror from list: "
-msgstr ""
+msgstr "Pilih cermin dari daftar: "
#: editor/file_type_cache.cpp
msgid "Can't open file_type_cache.cch for writing, not saving file type cache!"
msgstr ""
+"Tidak dapat membuka file_type_cache.cch untuk menulis, berkas cache tidak "
+"disimpan!"
#: editor/filesystem_dock.cpp
msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
+"'%s' tidak bisa ditelusuri karena tidak bisa ditemukan dalam berkas sistem!"
#: editor/filesystem_dock.cpp
msgid "View items as a grid of thumbnails"
-msgstr ""
+msgstr "Tampilkan item sebagai grid thumbnail"
#: editor/filesystem_dock.cpp
msgid "View items as a list"
-msgstr ""
+msgstr "Tampilkan item sebagai daftar"
#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
+"Status: Gagal mengimpor berkas. Mohon perbaiki berkas dan impor ulang secara "
+"manual."
#: editor/filesystem_dock.cpp
msgid "Cannot move/rename resources root."
-msgstr ""
+msgstr "Tidak bisa memindah/mengubah nama aset root."
#: editor/filesystem_dock.cpp
msgid "Cannot move a folder into itself."
-msgstr ""
+msgstr "Tidak dapat memindahkan folder ke dalam dirinya sendiri."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error moving:"
-msgstr "Error memuat:"
+msgstr "Galat saat memindahkan:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error duplicating:"
-msgstr "Error saat memuat:"
+msgstr "Galat saat menggandakan berkas:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Unable to update dependencies:"
-msgstr "Scene '%s' memiliki dependensi yang rusak:"
+msgstr "Tidak bisa memperbarui dependensi:"
#: editor/filesystem_dock.cpp
msgid "No name provided"
-msgstr ""
+msgstr "Nama masih kosong"
#: editor/filesystem_dock.cpp
msgid "Provided name contains invalid characters"
-msgstr ""
+msgstr "Nama yang dimasukkan tidak valid"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "No name provided."
-msgstr "Ubah Nama atau Pindahkan.."
+msgstr "Nama masih kosong."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Name contains invalid characters."
-msgstr "Karakter sah:"
+msgstr "Nama mengandung karakter tidak valid."
#: editor/filesystem_dock.cpp
msgid "A file or folder with this name already exists."
-msgstr ""
+msgstr "Sudah ada nama berkas atau folder seperti itu."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming file:"
-msgstr "Namai kembali Variabel"
+msgstr "Mengubah nama berkas dengan:"
#: editor/filesystem_dock.cpp
msgid "Renaming folder:"
-msgstr ""
+msgstr "Mengubah nama folder dengan:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Duplicating file:"
-msgstr "Gandakan"
+msgstr "Menggandakan berkas:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Duplicating folder:"
-msgstr "Gandakan"
+msgstr "Menggandakan folder:"
#: editor/filesystem_dock.cpp
msgid "Expand all"
@@ -2787,16 +2696,14 @@ msgid "Collapse all"
msgstr ""
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Rename.."
-msgstr "Ubah Nama atau Pindahkan.."
+msgstr "Ubah Nama.."
#: editor/filesystem_dock.cpp
msgid "Move To.."
-msgstr "Pindah Ke.."
+msgstr "Pindahkan ke.."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Open Scene(s)"
msgstr "Buka Scene"
@@ -2806,16 +2713,15 @@ msgstr ""
#: editor/filesystem_dock.cpp
msgid "Edit Dependencies.."
-msgstr ""
+msgstr "Sunting Dependensi.."
#: editor/filesystem_dock.cpp
msgid "View Owners.."
-msgstr ""
+msgstr "Tampilkan Pemilik Berkas.."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Duplicate.."
-msgstr "Gandakan"
+msgstr "Gandakan.."
#: editor/filesystem_dock.cpp
msgid "Previous Directory"
@@ -2831,14 +2737,13 @@ msgstr "Pindai Ulang Berkas Sistem"
#: editor/filesystem_dock.cpp
msgid "Toggle folder status as Favorite"
-msgstr ""
+msgstr "Kondisikan status folder sebagai Favorit"
#: editor/filesystem_dock.cpp
msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
+msgstr "Instance scene terpilih sebagai anak node saat ini."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid ""
"Scanning Files,\n"
"Please Wait.."
@@ -2853,7 +2758,7 @@ msgstr "Pindahkan"
#: editor/filesystem_dock.cpp editor/plugins/animation_tree_editor_plugin.cpp
#: editor/project_manager.cpp
msgid "Rename"
-msgstr ""
+msgstr "Ubah Nama"
#: editor/groups_editor.cpp
msgid "Add to Group"
@@ -2861,112 +2766,110 @@ msgstr "Tambahkan ke Grup"
#: editor/groups_editor.cpp
msgid "Remove from Group"
-msgstr ""
+msgstr "Hapus dari Grup"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import as Single Scene"
-msgstr "Memperbaharui Scene"
+msgstr "Impor sebagai Scene Tunggal"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Animations"
-msgstr ""
+msgstr "Impor dengan Animasi Terpisah"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials"
-msgstr ""
+msgstr "Impor dengan Material Terpisah"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects"
-msgstr ""
+msgstr "Impor dengan Objek Terpisah"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials"
-msgstr ""
+msgstr "Impor dengan Objek+Material Terpisah"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Animations"
-msgstr ""
+msgstr "Impor dengan Objek+Animasi Terpisah"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials+Animations"
-msgstr ""
+msgstr "Impor dengan Material+Animasi Terpisah"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials+Animations"
-msgstr ""
+msgstr "Impor dengan Objek+Material+Animasi Terpisah"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes"
-msgstr ""
+msgstr "Impor sebagai Beberapa Scene"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes+Materials"
-msgstr ""
+msgstr "Impor Beberapa Scene+Material"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/cube_grid_theme_editor_plugin.cpp
msgid "Import Scene"
-msgstr ""
+msgstr "Impor Scene"
#: editor/import/resource_importer_scene.cpp
msgid "Importing Scene.."
-msgstr ""
+msgstr "Mengimpor scene.."
#: editor/import/resource_importer_scene.cpp
+#, fuzzy
msgid "Generating Lightmaps"
-msgstr ""
+msgstr "Sedang Membuat Pemetaan Cahaya"
#: editor/import/resource_importer_scene.cpp
msgid "Generating for Mesh: "
msgstr ""
#: editor/import/resource_importer_scene.cpp
+#, fuzzy
msgid "Running Custom Script.."
-msgstr ""
+msgstr "Menjalankan Skrip Buatan.."
#: editor/import/resource_importer_scene.cpp
msgid "Couldn't load post-import script:"
-msgstr ""
+msgstr "Tidak dapat memuat skrip post-import:"
#: editor/import/resource_importer_scene.cpp
msgid "Invalid/broken script for post-import (check console):"
-msgstr ""
+msgstr "Skrip post-import rusak/tidak valid (cek konsol):"
#: editor/import/resource_importer_scene.cpp
msgid "Error running post-import script:"
-msgstr ""
+msgstr "Kesalahan saat menjalankan skrip post-import:"
#: editor/import/resource_importer_scene.cpp
msgid "Saving.."
-msgstr ""
+msgstr "Menyimpan.."
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
-msgstr ""
+msgstr "Jadikan Baku untuk '%s'"
#: editor/import_dock.cpp
msgid "Clear Default for '%s'"
-msgstr ""
+msgstr "Bersihkan Baku untuk '%s'"
#: editor/import_dock.cpp
-#, fuzzy
msgid " Files"
-msgstr "File:"
+msgstr " Berkas"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Import As:"
-msgstr "Mengimpor:"
+msgstr "Impor sebagai:"
#: editor/import_dock.cpp editor/property_editor.cpp
msgid "Preset.."
msgstr ""
#: editor/import_dock.cpp
-#, fuzzy
msgid "Reimport"
-msgstr "Mengimpor ulang"
+msgstr "Impor ulang"
#: editor/multi_node_edit.cpp
msgid "MultiNode Set"
@@ -2974,97 +2877,105 @@ msgstr ""
#: editor/node_dock.cpp
msgid "Groups"
-msgstr ""
+msgstr "Grup"
#: editor/node_dock.cpp
msgid "Select a Node to edit Signals and Groups."
-msgstr ""
+msgstr "Pilih sebuah node untuk menyunting Sinyal dan Grup."
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+#, fuzzy
msgid "Create Poly"
-msgstr ""
+msgstr "Buat Bidang"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/collision_polygon_editor_plugin.cpp
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+#, fuzzy
msgid "Edit Poly"
-msgstr ""
+msgstr "Sunting Bidang"
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid "Insert Point"
-msgstr ""
+msgstr "Tambah Titik"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/collision_polygon_editor_plugin.cpp
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
msgid "Edit Poly (Remove Point)"
-msgstr ""
+msgstr "Sunting Bidang (Hapus Titik)"
#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
msgid "Remove Poly And Point"
-msgstr ""
+msgstr "Hapus Bidang dan Titik"
#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
msgid "Create a new polygon from scratch"
-msgstr ""
+msgstr "Buat bidang baru dari awal"
#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
msgid ""
"Edit existing polygon:\n"
"LMB: Move Point.\n"
"Ctrl+LMB: Split Segment.\n"
"RMB: Erase Point."
msgstr ""
+"Sunting bidang yang ada:\n"
+"LMB: Pindahkan Titik.\n"
+"Ctrl+LMB: Pecah Segmen.\n"
+"RMB: Hapus Titik."
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Delete points"
-msgstr "Hapus"
+msgstr "Hapus Titik"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Toggle Autoplay"
-msgstr ""
+msgstr "Kondisikan Putar Otomatis"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "New Animation Name:"
-msgstr ""
+msgstr "Nama Animasi Baru:"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "New Anim"
-msgstr ""
+msgstr "Animasi Baru"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Change Animation Name:"
-msgstr ""
+msgstr "Ubah Nama Animasi:"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Delete Animation?"
-msgstr "Optimalkan Animasi"
+msgstr "Hapus Animasi?"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Remove Animation"
-msgstr ""
+msgstr "Hapus Animasi"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "ERROR: Invalid animation name!"
-msgstr ""
+msgstr "KESALAHAN: Nama animasi tidak valid!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "ERROR: Animation name already exists!"
-msgstr ""
+msgstr "KESALAHAN: Nama animasi sudah ada!"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Rename Animation"
-msgstr ""
+msgstr "Ubah Nama Animasi"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Animation"
-msgstr ""
+msgstr "Tambah Animasi"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Blend Next Changed"
@@ -3076,95 +2987,106 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Load Animation"
-msgstr ""
+msgstr "Muat Animasi"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Duplicate Animation"
-msgstr ""
+msgstr "Gandakan Animasi"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "ERROR: No animation to copy!"
-msgstr ""
+msgstr "KESALAHAN: Tidak ada animasi untuk disalin!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "ERROR: No animation resource on clipboard!"
-msgstr ""
+msgstr "KESALAHAN: Tidak ada aset animasi di clipboard!"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Pasted Animation"
-msgstr ""
+msgstr "Animasi Ditempel"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Paste Animation"
-msgstr ""
+msgstr "Tempelkan Animasi"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "ERROR: No animation to edit!"
-msgstr ""
+msgstr "KESALAHAN: Tidak ada animasi untuk disunting!"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Play selected animation backwards from current pos. (A)"
-msgstr ""
+msgstr "Mainkan mundur animasi terpilih dari lokasi sekarang. (A)"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Play selected animation backwards from end. (Shift+A)"
-msgstr ""
+msgstr "Mainkan mundur animasi terpilih dari akhir. (Shift+A)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Stop animation playback. (S)"
-msgstr ""
+msgstr "Hentikan playback animasi. (S)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation from start. (Shift+D)"
-msgstr ""
+msgstr "Mainkan animasi terpilih dari awal. (Shift+D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation from current pos. (D)"
-msgstr ""
+msgstr "Mainkan animasi terpilih dari posisi sekarang. (D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation position (in seconds)."
-msgstr ""
+msgstr "Posisi Animasi (dalam detik)."
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Scale animation playback globally for the node."
-msgstr ""
+msgstr "Skalakan playback animasi secara global untuk node ini."
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Create new animation in player."
-msgstr ""
+msgstr "Buat animasi baru dalam pemutar animasi."
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Load animation from disk."
-msgstr ""
+msgstr "Memuat animasi dari diska."
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Load an animation from disk."
-msgstr ""
+msgstr "Memuat animasi dari diska."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save the current animation"
-msgstr ""
+msgstr "Simpan animasi saat ini"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Display list of animations in player."
-msgstr ""
+msgstr "Tampilkan daftar animasi dalam pemutar animasi."
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Autoplay on Load"
-msgstr ""
+msgstr "Putar Otomatis saat Dimuat"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Edit Target Blend Times"
-msgstr ""
+msgstr "Sunting Target Waktu Blend"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Tools"
-msgstr ""
+msgstr "Perkakas Animasi"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Copy Animation"
-msgstr ""
+msgstr "Salin Animasi"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Onion Skinning"
@@ -3194,19 +3116,19 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "1 step"
-msgstr ""
+msgstr "1 langkah"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "2 steps"
-msgstr ""
+msgstr "2 langkah"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "3 steps"
-msgstr ""
+msgstr "3 langkah"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Differences Only"
-msgstr ""
+msgstr "Hanya yang berbeda"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Force White Modulate"
@@ -3218,18 +3140,18 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Create New Animation"
-msgstr ""
+msgstr "Buat Animasi Baru"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Name:"
-msgstr ""
+msgstr "Nama Animasi:"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Error!"
-msgstr ""
+msgstr "Kesalahan!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Blend Times:"
@@ -3250,12 +3172,12 @@ msgstr "Animasi"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "New name:"
-msgstr ""
+msgstr "Nama baru:"
#: editor/plugins/animation_tree_editor_plugin.cpp
#, fuzzy
msgid "Edit Filters"
-msgstr "File:"
+msgstr "Sunting Filter"
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
@@ -3384,8 +3306,9 @@ msgid "Import Animations.."
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Edit Node Filters"
-msgstr ""
+msgstr "Sunting Filter Node"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "Filters.."
@@ -3415,27 +3338,26 @@ msgid "Can't resolve hostname:"
msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connection error, please try again."
-msgstr "Gangguan koneks, silakan coba lagi."
+msgstr "Gangguan koneksi, silakan coba lagi."
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Can't connect to host:"
-msgstr "Sambungkan Ke Node:"
+msgstr "Tidak bisa terhubung ke host:"
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "No response from host:"
-msgstr ""
+msgstr "Tidak ada respon dari host:"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed, return code:"
-msgstr "Format file yang diminta tidak diketahui:"
+msgstr "Permintaan gagal, return code:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
-msgstr ""
+msgstr "Permintaan gagal, terlalu banyak pengalihan"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
@@ -3450,12 +3372,13 @@ msgid "Got:"
msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Failed sha256 hash check"
-msgstr ""
+msgstr "Gagal mengecek hash sha256"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr ""
+msgstr "Gagal Mengunduh Aset:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Fetching:"
@@ -3466,9 +3389,8 @@ msgid "Resolving.."
msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Error making request"
-msgstr "Error menyimpan resource!"
+msgstr "Kesalahan saat melakukan permintaan"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Idle"
@@ -3480,27 +3402,27 @@ msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download Error"
-msgstr ""
+msgstr "Unduhan Gagal"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "Unduhan untuk aset ini sedang diproses!"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "first"
-msgstr ""
+msgstr "pertama"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "prev"
-msgstr ""
+msgstr "sebelumnya"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "next"
-msgstr ""
+msgstr "selanjutnya"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "last"
-msgstr ""
+msgstr "terakhir"
#: editor/plugins/asset_library_editor_plugin.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
@@ -3510,7 +3432,7 @@ msgstr "Semua"
#: editor/plugins/asset_library_editor_plugin.cpp
#: editor/project_settings_editor.cpp
msgid "Plugins"
-msgstr ""
+msgstr "Pengaya"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Sort:"
@@ -3543,14 +3465,18 @@ msgstr "Menguji"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
-msgstr "Aset-aset File ZIP"
+msgstr "Berkas Aset ZIP"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
+#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene (for images to be saved in the same dir), or pick a save "
"path from the BakedLightmap properties."
msgstr ""
+"Tidak dapat menentukan lokasi penyimpanan untuk gambar lightmap\n"
+"Simpan scene-mu (untuk gambar silakan simpan di direktori yang sama dengan "
+"scene), atau tentukan lokasi penyimpanan dari properti BakedLightmap"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -3570,11 +3496,11 @@ msgstr "Ganti Radius Lampu"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Preview"
-msgstr ""
+msgstr "Pratinjau"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Configure Snap"
-msgstr ""
+msgstr "Atur Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -3635,12 +3561,14 @@ msgid "Create new horizontal and vertical guides"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Edit IK Chain"
-msgstr ""
+msgstr "Sunting Rantai IK"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Edit CanvasItem"
-msgstr ""
+msgstr "Sunting CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
@@ -4001,8 +3929,9 @@ msgid "Toggle Curve Linear Tangent"
msgstr ""
#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Hold Shift to edit tangents individually"
-msgstr ""
+msgstr "Tahan Shift untuk menyunting tangen kurva satu-persatu"
#: editor/plugins/gi_probe_editor_plugin.cpp
msgid "Bake GI Probe"
@@ -4026,8 +3955,9 @@ msgid "Items"
msgstr ""
#: editor/plugins/item_list_editor_plugin.cpp
+#, fuzzy
msgid "Item List Editor"
-msgstr ""
+msgstr "Penyunting Daftar Item"
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
msgid ""
@@ -4044,8 +3974,9 @@ msgid "Create a new polygon from scratch."
msgstr ""
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+#, fuzzy
msgid "Edit existing polygon:"
-msgstr ""
+msgstr "Sunting poligon yang ada:"
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
msgid "LMB: Move Point."
@@ -4567,8 +4498,9 @@ msgid "Transform UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Polygon 2D UV Editor"
-msgstr ""
+msgstr "Penyunting UV Poligon 2D"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Move Point"
@@ -4604,7 +4536,7 @@ msgstr ""
#: editor/project_settings_editor.cpp editor/property_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
-msgstr "Edit"
+msgstr "Sunting"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon->UV"
@@ -4654,8 +4586,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Open in Editor"
-msgstr ""
+msgstr "Buka dalam Penyunting"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/scene_tree_editor.cpp
@@ -4848,7 +4781,7 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Debug with external editor"
-msgstr "Editor Ketergantungan"
+msgstr "Debug menggunakan penyunting eksternal"
#: editor/plugins/script_editor_plugin.cpp
msgid "Open Godot online documentation"
@@ -4864,11 +4797,12 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "Go to previous edited document."
-msgstr ""
+msgstr "Ke dokumen yang disunting sebelumnya."
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Go to next edited document."
-msgstr ""
+msgstr "Ke dokumen yang disunting selanjutnya."
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
@@ -4900,7 +4834,7 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid ""
"Built-in scripts can only be edited when the scene they belong to is loaded"
-msgstr ""
+msgstr "Skrip built-in hanya bisa disunting ketika scene induknya dimuat"
#: editor/plugins/script_text_editor.cpp
msgid "Only resources from filesystem can be dropped."
@@ -5728,8 +5662,9 @@ msgid "Texture Region"
msgstr ""
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
msgid "Texture Region Editor"
-msgstr ""
+msgstr "Penyunting Daerah Tekstur"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Can't save theme to file:"
@@ -5760,11 +5695,11 @@ msgstr "Hapus"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Edit theme.."
-msgstr ""
+msgstr "Sunting tema.."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme editing menu."
-msgstr ""
+msgstr "Menu untuk menyunting tema."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5779,12 +5714,14 @@ msgid "Create Empty Template"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Create Empty Editor Template"
-msgstr ""
+msgstr "Buat Templat Penyunting Kosongan"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Create From Current Editor Theme"
-msgstr ""
+msgstr "Buat dari Tema Editor Saat Ini"
#: editor/plugins/theme_editor_plugin.cpp
msgid "CheckBox Radio1"
@@ -6133,7 +6070,7 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
-msgstr ""
+msgstr "Tidak dapat menyunting project.godot dalam lokasi proyek."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -6158,27 +6095,24 @@ msgid "Import Existing Project"
msgstr "Impor Projek yang Sudah Ada"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Import & Edit"
-msgstr "Impor"
+msgstr "Impor & Ubah"
#: editor/project_manager.cpp
msgid "Create New Project"
msgstr "Buat Projek Baru"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Create & Edit"
-msgstr "Buat"
+msgstr "Buat & Ubah"
#: editor/project_manager.cpp
msgid "Install Project:"
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Install & Edit"
-msgstr "Pasang"
+msgstr "Pasang & Ubah"
#: editor/project_manager.cpp
msgid "Project Name:"
@@ -7603,6 +7537,10 @@ msgstr "Proyek"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8377,6 +8315,13 @@ msgid "Invalid font size."
msgstr "Ukuran font tidak sah."
#, fuzzy
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Format version.txt tidak valid dalam berkas templat. Revisi tidak valid."
+
+#, fuzzy
#~ msgid "Can't write file."
#~ msgstr "Tidak dapat membuat folder."
diff --git a/editor/translations/is.po b/editor/translations/is.po
index b5cfaed2af..b0b8698f37 100644
--- a/editor/translations/is.po
+++ b/editor/translations/is.po
@@ -2365,12 +2365,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7253,6 +7247,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/it.po b/editor/translations/it.po
index 1d1094ef30..ba1a09e3ad 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -2485,14 +2485,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Formato di version.txt invalido nelle templates."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Formato di version.txt invalido nelle templates. Revision non é un "
-"identificatore valido."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Non é stato trovato version.txt all'interno di templates."
@@ -7621,6 +7613,10 @@ msgstr "Progetto"
msgid "Warnings"
msgstr "Avvertimento"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8416,6 +8412,13 @@ msgstr "Errore caricamento font."
msgid "Invalid font size."
msgstr "Dimensione font Invalida."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Formato di version.txt invalido nelle templates. Revision non é un "
+#~ "identificatore valido."
+
#~ msgid "Can't write file."
#~ msgstr "Impossibile scrivere il file."
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index e53819c999..905c498a3c 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -2746,14 +2746,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "テンプレート内ã®version.txt フォーマットãŒä¸æ­£ã§ã™."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"テンプレート内ã®version.txt フォーマットãŒä¸æ­£ã§ã™. Revisionã¯æœ‰åŠ¹ãªè­˜åˆ¥å­ã§"
-"ã¯ã‚ã‚Šã¾ã›ã‚“."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "テンプレート内ã«version.txtãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“."
@@ -8258,6 +8250,10 @@ msgstr "プロジェクト"
msgid "Warnings"
msgstr "警告"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
#, fuzzy
msgid ""
@@ -9088,6 +9084,13 @@ msgstr "フォント読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼ã€‚"
msgid "Invalid font size."
msgstr "無効ãªãƒ•ã‚©ãƒ³ãƒˆ サイズã§ã™ã€‚"
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "テンプレート内ã®version.txt フォーマットãŒä¸æ­£ã§ã™. Revisionã¯æœ‰åŠ¹ãªè­˜åˆ¥å­"
+#~ "ã§ã¯ã‚ã‚Šã¾ã›ã‚“."
+
#~ msgid "Can't write file."
#~ msgstr "ファイルã«æ›¸ãè¾¼ã¿ã§ãã¾ã›ã‚“ã§ã—ãŸ."
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index b80beb1273..28294c7307 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -13,8 +13,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-02-04 04:40+0000\n"
-"Last-Translator: Xavier Cho <mysticfallband@gmail.com>\n"
+"PO-Revision-Date: 2018-02-24 08:39+0000\n"
+"Last-Translator: TheRedPlanet <junmo.moon8@gmail.com>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/"
"godot/ko/>\n"
"Language: ko\n"
@@ -22,7 +22,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 2.19-dev\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -37,8 +37,9 @@ msgid "Anim Change Keyframe Time"
msgstr "애니메ì´ì…˜ 키프레임 시간 변경"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Anim Change Transition"
-msgstr "애니메ì´ì…˜ 변화 변경"
+msgstr "애니메ì´ì…˜ êµì²´ 트랜지션"
#: editor/animation_editor.cpp
msgid "Anim Change Transform"
@@ -163,8 +164,9 @@ msgid "Constant"
msgstr "비선형"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "In"
-msgstr "안"
+msgstr "In"
#: editor/animation_editor.cpp
msgid "Out"
@@ -2444,14 +2446,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "템플릿 ì•ˆì— version.txtê°€ 유효하지 ì•Šì€ í˜•ì‹ìž…니다."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"í…œí”Œë¦¿ì— version.txt 형ì‹ì´ 유효하지 않습니다. ë¦¬ë¹„ì „ì€ ìœ íš¨í•œ ì‹ë³„ìžê°€ ì•„ë‹™"
-"니다."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "í…œí”Œë¦¿ì— version.txt를 ì°¾ì„ ìˆ˜ 없습니다."
@@ -5960,11 +5954,12 @@ msgid "Invalid project path (changed anything?)."
msgstr "유효하지 ì•Šì€ í”„ë¡œì íŠ¸ 경로 (뭔가 변경하신 ê±°ë¼ë„?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
-msgstr "프로ì íŠ¸ ê²½ë¡œì— project.godot 파ì¼ì„ 편집할 수 없습니다."
+msgstr ""
+"프로ì íŠ¸ 경로로 부터 project.godot 파ì¼ì„ 로드 í•  수 없습니다 (ì—러 %d). 존재"
+"하지 않거나 ì†ìƒë˜ì—ˆì„ 수 있습니다."
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
@@ -7226,18 +7221,16 @@ msgid "Object can't provide a length."
msgstr "오브ì íŠ¸ëŠ” 길ì´ë¥¼ 제공할 수 없습니다."
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "ë‹¤ìŒ íƒ­"
+msgstr "ë‹¤ìŒ í‰ë©´"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "ì´ì „ 탭"
+msgstr "ì´ì „ í‰ë©´"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "í‰ë©´:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -7373,7 +7366,7 @@ msgstr "모노"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "About C# support"
-msgstr ""
+msgstr "C# 지ì›ì— 대하여"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "Create C# solution"
@@ -7391,6 +7384,10 @@ msgstr "프로ì íŠ¸ 빌드"
msgid "Warnings"
msgstr "경고"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -7933,11 +7930,11 @@ msgstr "ARVROriginì€ ARVRCamera ìžì‹ 노드를 요구 함"
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(ë‚¨ì€ ì‹œê°„: %d:%02d s)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
@@ -8135,6 +8132,13 @@ msgstr "í°íŠ¸ 로딩 ì—러."
msgid "Invalid font size."
msgstr "유효하지 ì•Šì€ í°íŠ¸ í¬ê¸°."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "í…œí”Œë¦¿ì— version.txt 형ì‹ì´ 유효하지 않습니다. ë¦¬ë¹„ì „ì€ ìœ íš¨í•œ ì‹ë³„ìžê°€ ì•„"
+#~ "닙니다."
+
#~ msgid "Can't write file."
#~ msgstr "파ì¼ì— 쓸 수 없습니다."
diff --git a/editor/translations/lt.po b/editor/translations/lt.po
index 520e4fd1d8..0ad2945bdc 100644
--- a/editor/translations/lt.po
+++ b/editor/translations/lt.po
@@ -2374,12 +2374,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Å ablonuose nerasta version.txt failo."
@@ -7275,6 +7269,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index e6ad8950f6..8d9ffe7a21 100644
--- a/editor/translations/nb.po
+++ b/editor/translations/nb.po
@@ -2477,13 +2477,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Ugyldig version.txt format i mal."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Ugyldig version.txt format i mal. Revisjon er ikke en gyldig identifikator."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Ingen version.txt funnet i mal."
@@ -7481,6 +7474,10 @@ msgstr "Prosjekt"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8172,6 +8169,13 @@ msgstr ""
msgid "Invalid font size."
msgstr "Ugyldig fontstørrelse."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Ugyldig version.txt format i mal. Revisjon er ikke en gyldig "
+#~ "identifikator."
+
#~ msgid "Can't write file."
#~ msgstr "Kan ikke skrive fil."
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index fb2ba35793..e54a0c7960 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -2471,14 +2471,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Ongeldig version.txt formaat in sjablonen."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Ongeldig version.txt formaat in sjablonen. Revisie is geen geldig "
-"identificatienummer."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Geen version.txt gevonden in sjablonen."
@@ -7514,6 +7506,10 @@ msgstr "Project"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8279,6 +8275,13 @@ msgstr "Fout bij het laden van lettertype."
msgid "Invalid font size."
msgstr "Ongeldige lettertype grootte."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Ongeldig version.txt formaat in sjablonen. Revisie is geen geldig "
+#~ "identificatienummer."
+
#~ msgid "Can't write file."
#~ msgstr "Kan niet naar bestand schrijven."
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index efd392cf27..21618953a0 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -2463,14 +2463,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Nieprawidłowy format pliku version.txt w szablonach."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"nieprawidłowy format pliku version.txt wewnątrz szablonów. Zmiana nie jest "
-"prawidłowym identyfikatorem."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Nie znaleziono pliku version.txt w szablonach."
@@ -7502,6 +7494,10 @@ msgstr "Zbuduj projekt"
msgid "Warnings"
msgstr "Ostrzeżenia"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8247,6 +8243,13 @@ msgstr "BÅ‚Ä…d Å‚adowania fonta."
msgid "Invalid font size."
msgstr "Niepoprawny rozmiar fonta."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "nieprawidłowy format pliku version.txt wewnątrz szablonów. Zmiana nie "
+#~ "jest prawidłowym identyfikatorem."
+
#~ msgid "Can't write file."
#~ msgstr "Nie można zapisać pliku."
diff --git a/editor/translations/pr.po b/editor/translations/pr.po
index ee893fa770..6029e861fd 100644
--- a/editor/translations/pr.po
+++ b/editor/translations/pr.po
@@ -2382,12 +2382,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7328,6 +7322,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index 534aed164c..ae67217cfd 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: 2016-05-30\n"
-"PO-Revision-Date: 2018-02-19 19:38+0000\n"
+"PO-Revision-Date: 2018-02-22 20:49+0000\n"
"Last-Translator: Michael Alexsander Silva Dias <michaelalexsander@protonmail."
"com>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
@@ -36,7 +36,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 2.19\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -2469,14 +2469,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Formato do version.txt dentro dos modelos é inválido."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Formato do version.txt dentro dos modelos é inválido. A revisão não é um "
-"identificador válido."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Não foi encontrado um version.txt dentro dos modelos."
@@ -6007,11 +5999,12 @@ msgid "Invalid project path (changed anything?)."
msgstr "Caminho de projeto inválido (mudou alguma coisa?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
-msgstr "Não foi possível editar project.godot no caminho do projeto."
+msgstr ""
+"Não foi possível carregar project.godot no caminho do projeto (erro %d). Ele "
+"pode estar ausente ou corrompido."
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
@@ -7278,18 +7271,16 @@ msgid "Object can't provide a length."
msgstr "Objeto não pôde fornecer um comprimento."
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "Próxima guia"
+msgstr "Próximo Plano"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "Guia anterior"
+msgstr "Plano Anterior"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "Plano:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -7425,7 +7416,7 @@ msgstr "Mono"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "About C# support"
-msgstr ""
+msgstr "Sobre o suporte ao C#"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "Create C# solution"
@@ -7443,6 +7434,10 @@ msgstr "Compilar Projeto"
msgid "Warnings"
msgstr "Avisos"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -7998,11 +7993,11 @@ msgstr "ARVROrigin necessita um nó ARVRCamera como filho"
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(Tempo Restante: %d:%02d s)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
@@ -8204,6 +8199,13 @@ msgstr "Erro ao carregar fonte."
msgid "Invalid font size."
msgstr "Tamanho de fonte inválido."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Formato do version.txt dentro dos modelos é inválido. A revisão não é um "
+#~ "identificador válido."
+
#~ msgid "Can't write file."
#~ msgstr "Não foi possível escrever o arquivo."
diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po
index 9ba20417e5..9f520ddf46 100644
--- a/editor/translations/pt_PT.po
+++ b/editor/translations/pt_PT.po
@@ -8,6 +8,7 @@
# João Graça <jgraca95@gmail.com>, 2017.
# João Lopes <linux-man@hotmail.com>, 2017-2018.
# Miguel Gomes <miggas09@gmail.com>, 2017.
+# Paulo Caldeira <paucal@gmail.com>, 2018.
# Pedro Gomes <pedrogomes1698@gmail.com>, 2017.
# Rueben Stevens <supercell03@gmail.com>, 2017.
# SARDON <fabio3_Santos@hotmail.com>, 2017.
@@ -16,15 +17,15 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2018-01-31 20:40+0000\n"
-"Last-Translator: João Lopes <linux-man@hotmail.com>\n"
+"PO-Revision-Date: 2018-02-24 23:41+0000\n"
+"Last-Translator: Paulo Caldeira <paucal@gmail.com>\n"
"Language-Team: Portuguese (Portugal) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_PT/>\n"
"Language: pt_PT\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 2.19-dev\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -837,7 +838,7 @@ msgstr "Alterar Volume do canal áudio"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Solo"
-msgstr "Alternar solo do canal áudio"
+msgstr "Alternar solo do canal de áudio"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Mute"
@@ -845,7 +846,7 @@ msgstr "Alternar silêncio do canal áudio"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Bypass Effects"
-msgstr "Alternar efeitos do canal áudio"
+msgstr "Alternar efeitos bypass do canal de áudio"
#: editor/editor_audio_buses.cpp
msgid "Select Audio Bus Send"
@@ -2458,14 +2459,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Formato de version.txt inválido, dentro dos Modelos."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Formato de version.txt inválido, dentro dos Modelos. Revisão não é um "
-"identificador válido."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Não foi encontrado version.txt dentro dos Modelos."
@@ -5986,11 +5979,12 @@ msgid "Invalid project path (changed anything?)."
msgstr "Caminho de Projeto inválido (alguma alteração?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
-msgstr "Impossível editar project.godot no Caminho do Projeto."
+msgstr ""
+"Não foi possível carregar o project.godot no caminho do projeto. Poderá "
+"estar em falta ou corrompido."
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
@@ -7257,18 +7251,16 @@ msgid "Object can't provide a length."
msgstr "Objeto não fornece um comprimento."
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "Próxima guia"
+msgstr "Plano seguinte"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "Guia anterior"
+msgstr "Plano anterior"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "Plano:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -7404,7 +7396,7 @@ msgstr "Mono"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "About C# support"
-msgstr ""
+msgstr "Sobre o suporte C#"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "Create C# solution"
@@ -7422,6 +7414,10 @@ msgstr "Construir Projeto"
msgid "Warnings"
msgstr "Avisos"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -7976,11 +7972,11 @@ msgstr "ARVROrigin exige um Nó filho ARVRCamera"
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(Tempo restante: %d:%02d s)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
@@ -8184,6 +8180,13 @@ msgstr "Erro ao carregar letra."
msgid "Invalid font size."
msgstr "Tamanho de letra inválido."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Formato de version.txt inválido, dentro dos Modelos. Revisão não é um "
+#~ "identificador válido."
+
#~ msgid "Can't write file."
#~ msgstr "Impossível escrever o Ficheiro."
diff --git a/editor/translations/ro.po b/editor/translations/ro.po
index 287ababbd6..1d89dd74ea 100644
--- a/editor/translations/ro.po
+++ b/editor/translations/ro.po
@@ -2364,12 +2364,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7251,6 +7245,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index 95627dbb37..67e02b9ce8 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -18,7 +18,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-01-24 12:27+0000\n"
+"PO-Revision-Date: 2018-02-23 20:40+0000\n"
"Last-Translator: ijet <my-ijet@mail.ru>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ru/>\n"
@@ -28,7 +28,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\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 2.19-dev\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -2459,14 +2459,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Ðеверный формат version.txt файла внутри шаблонов."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Ðеверный формат version.txt файла внутри шаблонов. Идентификатор ревизии не "
-"верен."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Ðе найден version.txt файл в шаблонах."
@@ -5990,11 +5982,12 @@ msgid "Invalid project path (changed anything?)."
msgstr "Ðеверный путь к проекту (Что-то изменили?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
-msgstr "Ðе удалоÑÑŒ изменить project.godot в папке проекта."
+msgstr ""
+"Ðе удалоÑÑŒ загрузить project.godot в пути проекта (ошибка %d). Возможно, он "
+"отÑутÑтвует или поврежден."
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
@@ -7262,18 +7255,16 @@ msgid "Object can't provide a length."
msgstr "Объект не может предоÑтавить длину."
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ð²ÐºÐ»Ð°Ð´ÐºÐ°"
+msgstr "Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ð¿Ð¾ÑкоÑÑ‚ÑŒ"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ð²ÐºÐ»Ð°Ð´ÐºÐ°"
+msgstr "ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ð¿Ð»Ð¾ÑкоÑÑ‚ÑŒ"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "ПлоÑкоÑÑ‚ÑŒ:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -7409,7 +7400,7 @@ msgstr "Моно"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "About C# support"
-msgstr ""
+msgstr "О C# поддержке"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "Create C# solution"
@@ -7427,6 +7418,10 @@ msgstr "Собрать проект"
msgid "Warnings"
msgstr "ПредупреждениÑ"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -7830,6 +7825,10 @@ msgid ""
"Consider adding CollisionShape2D or CollisionPolygon2D children nodes to "
"define its shape."
msgstr ""
+"Этот узел не имеет дочерних форм, поÑтому он не может взаимодейÑтвовать Ñ "
+"проÑтранÑтвом.\n"
+"РаÑÑмотрите возможноÑÑ‚ÑŒ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ CollisionShape2D или CollisionPolygon2D "
+"дочерних узлов, Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ ÐµÐ³Ð¾ формы."
#: scene/2d/collision_polygon_2d.cpp
msgid ""
@@ -7981,8 +7980,9 @@ msgid "%d%%"
msgstr ""
#: scene/3d/baked_lightmap.cpp
+#, fuzzy
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(ОÑталоÑÑŒ: %d:%02d Ñек)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
@@ -8006,6 +8006,10 @@ msgid ""
"Consider adding CollisionShape or CollisionPolygon children nodes to define "
"its shape."
msgstr ""
+"Этот узел не имеет дочерних форм, поÑтому он не может взаимодейÑтвовать Ñ "
+"проÑтранÑтвом.\n"
+"РаÑÑмотрите возможноÑÑ‚ÑŒ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ CollisionShape или CollisionPolygon "
+"дочерних узлов, чтобы определить его форму."
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -8181,6 +8185,13 @@ msgstr "Ошибка загрузки шрифта."
msgid "Invalid font size."
msgstr "ÐедопуÑтимый размер шрифта."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Ðеверный формат version.txt файла внутри шаблонов. Идентификатор ревизии "
+#~ "не верен."
+
#~ msgid "Can't write file."
#~ msgstr "Ðе удалоÑÑŒ запиÑать файл."
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index d9bd671d69..c5fa76fb01 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -2385,12 +2385,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7332,6 +7326,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index 787d5e23c3..04fb6d9816 100644
--- a/editor/translations/sl.po
+++ b/editor/translations/sl.po
@@ -2380,12 +2380,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7315,6 +7309,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po
index 66ceb3e449..e411ff2305 100644
--- a/editor/translations/sr_Cyrl.po
+++ b/editor/translations/sr_Cyrl.po
@@ -2453,14 +2453,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Ðеважећи формат датотеке version.txt унутар шаблона."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Ðеважећи формат датотеке „version.txt“ унутар шаблона. „Revision“ није "
-"важећи идентификатор."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "„version.txt“ није пронаћен у шаблону."
@@ -7436,6 +7428,10 @@ msgstr "Пројекат"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8110,6 +8106,13 @@ msgstr ""
msgid "Invalid font size."
msgstr "Ðеважећа величина фонта."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Ðеважећи формат датотеке „version.txt“ унутар шаблона. „Revision“ није "
+#~ "важећи идентификатор."
+
#~ msgid "Can't write file."
#~ msgstr "ÐеуÑпех при запиÑивању датотеке."
diff --git a/editor/translations/sv.po b/editor/translations/sv.po
index 4754d7cb18..64a268a7bc 100644
--- a/editor/translations/sv.po
+++ b/editor/translations/sv.po
@@ -2699,12 +2699,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7878,6 +7872,10 @@ msgstr "Projekt"
msgid "Warnings"
msgstr "Varning"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/ta.po b/editor/translations/ta.po
index 0fb480b38a..4be5e8b832 100644
--- a/editor/translations/ta.po
+++ b/editor/translations/ta.po
@@ -2365,12 +2365,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7253,6 +7247,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/th.po b/editor/translations/th.po
index 5b664777b0..b31fba186a 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -9,7 +9,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2018-02-22 12:40+0000\n"
+"PO-Revision-Date: 2018-02-25 04:41+0000\n"
"Last-Translator: Poommetee Ketson <poommetee@protonmail.com>\n"
"Language-Team: Thai <https://hosted.weblate.org/projects/godot-engine/godot/"
"th/>\n"
@@ -2404,12 +2404,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "รูปà¹à¸šà¸šà¸‚อง version.txt ในà¹à¸¡à¹ˆà¹à¸šà¸šà¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr "รูปà¹à¸šà¸šà¸‚อง version.txt ในà¹à¸¡à¹ˆà¹à¸šà¸šà¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡ หมายเลขรุ่น revision ต้องใช้ระบุได้"
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "ไม่พบ version.txt ในà¹à¸¡à¹ˆà¹à¸šà¸š"
@@ -5910,11 +5904,11 @@ msgid "Invalid project path (changed anything?)."
msgstr "ตำà¹à¸«à¸™à¹ˆà¸‡à¹‚ปรเจà¸à¸•à¹Œà¸œà¸´à¸”พลาด (ได้à¹à¸à¹‰à¹„ขอะไรไปหรือไม่?)"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
-msgstr "à¹à¸à¹‰à¹„ขไฟล์ project.godot ไม่ได้"
+msgstr ""
+"โหลดไฟล์ project.godot ในโฟลเดอร์โปรเจà¸à¸•à¹Œà¹„ม่ได้ (ข้อผิดพลาด %d) ไฟล์อาจสูà¸à¸«à¸²à¸¢à¸«à¸£à¸·à¸­à¹€à¸ªà¸µà¸¢à¸«à¸²à¸¢"
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
@@ -6345,11 +6339,11 @@ msgstr "รีซอร์ส:"
#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
-msgstr "à¹à¸—นที่ตามท้องถิ่น:"
+msgstr "à¹à¸—นที่ตามภูมิภาค:"
#: editor/project_settings_editor.cpp
msgid "Locale"
-msgstr "ท้องถิ่น"
+msgstr "ภูมิภาค"
#: editor/project_settings_editor.cpp
msgid "Locales Filter"
@@ -7169,18 +7163,16 @@ msgid "Object can't provide a length."
msgstr "ไม่สามารถบอà¸à¸„วามยาวของวัตถุได้"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "à¹à¸—็บถัดไป"
+msgstr "ระนาบถัดไป"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "à¹à¸—็บà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
+msgstr "ระนาบà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "ระนาบ:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -7316,7 +7308,7 @@ msgstr "โมโน"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "About C# support"
-msgstr ""
+msgstr "เà¸à¸µà¹ˆà¸¢à¸§à¸à¸±à¸šà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™ C#"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "Create C# solution"
@@ -7334,6 +7326,10 @@ msgstr "Build โปรเจà¸à¸•à¹Œ"
msgid "Warnings"
msgstr "คำเตือน"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -7850,11 +7846,11 @@ msgstr "ARVROrigin ต้องมี ARVRCamera เป็นโหนดลูà
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(เหลืออีà¸: %d:%02d วิ)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
@@ -8038,6 +8034,11 @@ msgstr "ผิดพลาดขณะโหลดฟอนต์"
msgid "Invalid font size."
msgstr "ขนาดฟอนต์ผิดพลาด"
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr "รูปà¹à¸šà¸šà¸‚อง version.txt ในà¹à¸¡à¹ˆà¹à¸šà¸šà¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡ หมายเลขรุ่น revision ต้องใช้ระบุได้"
+
#~ msgid "Can't write file."
#~ msgstr "เขียนไฟล์ไม่ได้"
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index f486ca5fce..bb485dc603 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -2453,14 +2453,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Şablonların içinde geçersiz version.txt formatı."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Şablonların içinde geçersiz version.txt formatı. Revizyon geçerli bir "
-"tanımlayıcı değil."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Şablonların içinde version.txt bulunamadı."
@@ -7417,6 +7409,10 @@ msgstr "Projeyi Ä°nÅŸa et"
msgid "Warnings"
msgstr "Uyarılar"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8175,6 +8171,13 @@ msgstr "Yazıtipi yükleme hatası."
msgid "Invalid font size."
msgstr "Geçersiz yazıtipi boyutu."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Şablonların içinde geçersiz version.txt formatı. Revizyon geçerli bir "
+#~ "tanımlayıcı değil."
+
#~ msgid "Can't write file."
#~ msgstr "Dosyaya yazılamıyor."
diff --git a/editor/translations/uk.po b/editor/translations/uk.po
index 4b5943bd44..685812f2d4 100644
--- a/editor/translations/uk.po
+++ b/editor/translations/uk.po
@@ -13,7 +13,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Ukrainian (Godot Engine)\n"
-"PO-Revision-Date: 2018-01-24 17:51+0000\n"
+"PO-Revision-Date: 2018-02-22 18:08+0000\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/"
"godot/uk/>\n"
@@ -22,7 +22,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 2.19-dev\n"
+"X-Generator: Weblate 2.20-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -2456,14 +2456,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "Ðеправильний формат version.txt у шаблонах."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-"Ðеправильний формат version.txt у шаблонах. Ідентифікатор ревізії не Ñ” "
-"дійÑним."
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "Файл version.txt не знайдено у шаблонах."
@@ -5991,11 +5983,12 @@ msgid "Invalid project path (changed anything?)."
msgstr "Ðекоректний шлÑÑ… до проекту (щоÑÑŒ змінилоÑÑ?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
-msgstr "Ðе вдалоÑÑ Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ñ‚Ð¸ project.godot у каталозі проекту."
+msgstr ""
+"Ðе вдалоÑÑ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸ project.godot у каталозі проекту (помилка %d). "
+"Можливо, файл вилучено або пошкоджено."
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
@@ -7264,18 +7257,16 @@ msgid "Object can't provide a length."
msgstr "Об'єкт не може надавати довжину."
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "ÐаÑтупна вкладка"
+msgstr "ÐаÑтупна площина"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð½Ñ Ð²ÐºÐ»Ð°Ð´ÐºÐ°"
+msgstr "ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð½Ñ Ð¿Ð»Ð¾Ñ‰Ð¸Ð½Ð°"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "Площина:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -7411,7 +7402,7 @@ msgstr "Моно"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "About C# support"
-msgstr ""
+msgstr "Про підтримку C#"
#: modules/mono/editor/godotsharp_editor.cpp
msgid "Create C# solution"
@@ -7429,6 +7420,10 @@ msgstr "Зібрати проект"
msgid "Warnings"
msgstr "ПопередженнÑ"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -7981,11 +7976,11 @@ msgstr "ARVROrigin повинен мати дочірній вузол ARVRCamer
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(ЛишилоÑÑ Ñ‡Ð°Ñу: %d:%02d Ñ)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
@@ -8190,6 +8185,13 @@ msgstr "Помилка Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ ÑˆÑ€Ð¸Ñ„Ñ‚Ñƒ."
msgid "Invalid font size."
msgstr "Ðекоректний розмір шрифту."
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr ""
+#~ "Ðеправильний формат version.txt у шаблонах. Ідентифікатор ревізії не Ñ” "
+#~ "дійÑним."
+
#~ msgid "Can't write file."
#~ msgstr "Ðе вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати файл."
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index 556701f7d9..96fbfbeee6 100644
--- a/editor/translations/ur_PK.po
+++ b/editor/translations/ur_PK.po
@@ -2377,12 +2377,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7310,6 +7304,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/vi.po b/editor/translations/vi.po
index 8ca55c778b..c39ccc4db9 100644
--- a/editor/translations/vi.po
+++ b/editor/translations/vi.po
@@ -2368,12 +2368,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7260,6 +7254,10 @@ msgstr ""
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index c83806677e..9c55ece6db 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -2419,12 +2419,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "模æ¿æ–‡ä»¶ä¸­çš„version.txtä¸åˆæ³•ã€‚"
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr "模æ¿ä¸­çš„ version.txt文件格å¼ä¸åˆæ³•ï¼Œæ— æ•ˆçš„版本标识符。"
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr "模æ¿ä¸­æ²¡æœ‰æ‰¾åˆ°version.txt文件。"
@@ -7352,6 +7346,10 @@ msgstr "构建项目"
msgid "Warnings"
msgstr "警告"
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -8061,6 +8059,11 @@ msgstr "加载字体出错。"
msgid "Invalid font size."
msgstr "字体大å°éžæ³•ã€‚"
+#~ msgid ""
+#~ "Invalid version.txt format inside templates. Revision is not a valid "
+#~ "identifier."
+#~ msgstr "模æ¿ä¸­çš„ version.txt文件格å¼ä¸åˆæ³•ï¼Œæ— æ•ˆçš„版本标识符。"
+
#~ msgid "Can't write file."
#~ msgstr "无法写入文件。"
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index 5d5ea0fa4d..6e2e5ac502 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -2520,12 +2520,6 @@ msgid "Invalid version.txt format inside templates."
msgstr "無效的 version.txt æ ¼å¼ inside templates."
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
#, fuzzy
msgid "No version.txt found inside templates."
msgstr "找ä¸åˆ°version.txt inside templates."
@@ -7567,6 +7561,10 @@ msgstr "專案"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index d212fa995f..2d67ef98c1 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -2400,12 +2400,6 @@ msgid "Invalid version.txt format inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-msgid ""
-"Invalid version.txt format inside templates. Revision is not a valid "
-"identifier."
-msgstr ""
-
-#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
msgstr ""
@@ -7390,6 +7384,10 @@ msgstr "專案設定"
msgid "Warnings"
msgstr ""
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
diff --git a/main/main.cpp b/main/main.cpp
index 5f336e17c5..82b79cd9a2 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -349,6 +349,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
Vector<String> breakpoints;
bool use_custom_res = true;
bool force_res = false;
+ bool found_project = false;
packed_data = PackedData::get_singleton();
if (!packed_data)
@@ -760,7 +761,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
#endif
- if (globals->setup(game_path, main_pack, upwards) != OK) {
+ if (globals->setup(game_path, main_pack, upwards) == OK) {
+ found_project = true;
+ } else {
#ifdef TOOLS_ENABLED
editor = false;
@@ -769,15 +772,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
goto error;
#endif
- } else if (String(GLOBAL_DEF("application/run/main_scene", "")) == "") {
-#ifdef TOOLS_ENABLED
- if (!editor) {
-#endif
- OS::get_singleton()->print("Error: Can't run project: no main scene defined.\n");
- goto error;
-#ifdef TOOLS_ENABLED
- }
-#endif
}
GLOBAL_DEF("logging/file_logging/enable_file_logging", false);
@@ -801,14 +795,21 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
if (!project_manager) {
// Determine if the project manager should be requested
- project_manager =
- main_args.size() == 0 &&
- !ProjectSettings::get_singleton()->has_setting("application/run/main_loop_type") &&
- (!ProjectSettings::get_singleton()->has_setting("application/run/main_scene") ||
- String(ProjectSettings::get_singleton()->get("application/run/main_scene")) == "");
+ project_manager = main_args.size() == 0 && !found_project;
}
#endif
+ if (main_args.size() == 0 && String(GLOBAL_DEF("application/run/main_scene", "")) == "") {
+#ifdef TOOLS_ENABLED
+ if (!editor && !project_manager) {
+#endif
+ OS::get_singleton()->print("Error: Can't run project: no main scene defined.\n");
+ goto error;
+#ifdef TOOLS_ENABLED
+ }
+#endif
+ }
+
if (editor || project_manager) {
use_custom_res = false;
input_map->load_default(); //keys for editor
@@ -828,8 +829,11 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->set_cmdline(execpath, main_args);
- //if (video_driver == "") // useless for now, so removing
- // video_driver = GLOBAL_DEF("display/driver/name", Variant((const char *)OS::get_singleton()->get_video_driver_name(0)));
+ GLOBAL_DEF("rendering/quality/driver/driver_name", "GLES3");
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_name", PropertyInfo(Variant::STRING, "rendering/quality/driver/driver_name", PROPERTY_HINT_ENUM, "GLES3,GLES2"));
+ if (video_driver == "") {
+ video_driver = GLOBAL_GET("rendering/quality/driver/driver_name");
+ }
GLOBAL_DEF("display/window/size/width", 1024);
GLOBAL_DEF("display/window/size/height", 600);
diff --git a/methods.py b/methods.py
index ab49ae9dda..42679610af 100644
--- a/methods.py
+++ b/methods.py
@@ -19,637 +19,6 @@ def add_source_files(self, sources, filetype, lib_env=None, shared=False):
sources.append(self.Object(f))
-def build_shader_header(target, source, env):
-
- for x in source:
- print(x)
-
- name = str(x)
- name = name[name.rfind("/") + 1:]
- name = name[name.rfind("\\") + 1:]
- name = name.replace(".", "_")
-
- fs = open(str(x), "r")
- fd = open(str(x) + ".gen.h", "w")
- fd.write("/* this file has been generated by SCons, do not edit! */\n")
- fd.write("static const char *" + name + "=\n")
- line = fs.readline()
- while(line):
- line = line.replace("\r", "")
- line = line.replace("\n", "")
- line = line.replace("\\", "\\\\")
- line = line.replace("\"", "\\\"")
- fd.write("\"" + line + "\\n\"\n")
- line = fs.readline()
-
- fd.write(";\n")
-
- return 0
-
-
-def build_glsl_header(filename):
-
- fs = open(filename, "r")
- line = fs.readline()
-
- vertex_lines = []
- fragment_lines = []
- uniforms = []
- attributes = []
- fbos = []
- conditionals = []
- texunits = []
- texunit_names = []
- ubos = []
- ubo_names = []
-
- reading = ""
- line_offset = 0
- vertex_offset = 0
- fragment_offset = 0
-
- while(line):
-
- if (line.find("[vertex]") != -1):
- reading = "vertex"
- line = fs.readline()
- line_offset += 1
- vertex_offset = line_offset
- continue
-
- if (line.find("[fragment]") != -1):
- reading = "fragment"
- line = fs.readline()
- line_offset += 1
- fragment_offset = line_offset
- continue
-
- if (line.find("#ifdef ") != -1):
- ifdefline = line.replace("#ifdef ", "").strip()
- if (not ifdefline in conditionals):
- conditionals += [ifdefline]
-
- if (line.find("#elif defined(") != -1):
- ifdefline = line.replace("#elif defined(", "").strip()
- ifdefline = ifdefline.replace(")", "").strip()
- if (not ifdefline in conditionals):
- conditionals += [ifdefline]
-
- import re
- if re.search(r"^\s*uniform", line):
-
- if (line.lower().find("texunit:") != -1):
- # texture unit
- texunit = str(int(line[line.find(":") + 1:].strip()))
- uline = line[:line.lower().find("//")]
- uline = uline.replace("uniform", "")
- uline = uline.replace(";", "")
- lines = uline.split(",")
- for x in lines:
-
- x = x.strip()
- x = x[x.rfind(" ") + 1:]
- if (x.find("[") != -1):
- # unfiorm array
- x = x[:x.find("[")]
-
- if (not x in texunit_names):
- texunits += [(x, texunit)]
- texunit_names += [x]
-
- elif (line.lower().find("ubo:") != -1):
- # ubo
- uboidx = str(int(line[line.find(":") + 1:].strip()))
- uline = line[:line.lower().find("//")]
- uline = uline[uline.find("uniform") + len("uniform"):]
- uline = uline.replace(";", "")
- uline = uline.replace("{", "").strip()
- lines = uline.split(",")
- for x in lines:
-
- x = x.strip()
- x = x[x.rfind(" ") + 1:]
- if (x.find("[") != -1):
- # unfiorm array
- x = x[:x.find("[")]
-
- if (not x in ubo_names):
- ubos += [(x, uboidx)]
- ubo_names += [x]
-
- else:
- uline = line.replace("uniform", "")
- uline = uline.replace(";", "")
- lines = uline.split(",")
- for x in lines:
-
- x = x.strip()
- x = x[x.rfind(" ") + 1:]
- if (x.find("[") != -1):
- # unfiorm array
- x = x[:x.find("[")]
-
- if (not x in uniforms):
- uniforms += [x]
-
- if ((line.strip().find("in ") == 0 or line.strip().find("attribute ") == 0) and line.find("attrib:") != -1):
- uline = line.replace("in ", "")
- uline = uline.replace("attribute ", "")
- uline = uline.replace(";", "")
- uline = uline[uline.find(" "):].strip()
-
- if (uline.find("//") != -1):
- name, bind = uline.split("//")
- if (bind.find("attrib:") != -1):
- name = name.strip()
- bind = bind.replace("attrib:", "").strip()
- attributes += [(name, bind)]
-
- if (line.strip().find("out ") == 0):
- uline = line.replace("out", "").strip()
- uline = uline.replace(";", "")
- uline = uline[uline.find(" "):].strip()
-
- if (uline.find("//") != -1):
- name, bind = uline.split("//")
- if (bind.find("drawbuffer:") != -1):
- name = name.strip()
- bind = bind.replace("drawbuffer:", "").strip()
- fbos += [(name, bind)]
-
- line = line.replace("\r", "")
- line = line.replace("\n", "")
- line = line.replace("\\", "\\\\")
- line = line.replace("\"", "\\\"")
- # line=line+"\\n\\" no need to anymore
-
- if (reading == "vertex"):
- vertex_lines += [line]
- if (reading == "fragment"):
- fragment_lines += [line]
-
- line = fs.readline()
- line_offset += 1
-
- fs.close()
-
- out_file = filename + ".gen.h"
- fd = open(out_file, "w")
-
- fd.write("/* WARNING, THIS FILE WAS GENERATED, DO NOT EDIT */\n")
-
- out_file_base = out_file
- out_file_base = out_file_base[out_file_base.rfind("/") + 1:]
- out_file_base = out_file_base[out_file_base.rfind("\\") + 1:]
-# print("out file "+out_file+" base " +out_file_base)
- out_file_ifdef = out_file_base.replace(".", "_").upper()
- fd.write("#ifndef " + out_file_ifdef + "\n")
- fd.write("#define " + out_file_ifdef + "\n")
-
- out_file_class = out_file_base.replace(".glsl.h", "").title().replace("_", "").replace(".", "") + "ShaderGL"
- fd.write("\n\n")
- fd.write("#include \"drivers/opengl/shader_gl.h\"\n\n\n")
- fd.write("class " + out_file_class + " : public ShaderGL {\n\n")
- fd.write("\t virtual String get_shader_name() const { return \"" + out_file_class + "\"; }\n")
- fd.write("public:\n\n")
-
- if (len(conditionals)):
- fd.write("\tenum Conditionals {\n")
- for x in conditionals:
- fd.write("\t\t" + x + ",\n")
- fd.write("\t};\n\n")
- if (len(uniforms)):
- fd.write("\tenum Uniforms {\n")
- for x in uniforms:
- fd.write("\t\t" + x.upper() + ",\n")
- fd.write("\t};\n\n")
-
- fd.write("\t_FORCE_INLINE_ int get_uniform(Uniforms p_uniform) const { return _get_uniform(p_uniform); }\n\n")
- if (len(conditionals)):
-
- fd.write("\t_FORCE_INLINE_ void set_conditional(Conditionals p_conditional,bool p_enable) { _set_conditional(p_conditional,p_enable); }\n\n")
- fd.write("\t#define _FU if (get_uniform(p_uniform)<0) return; ERR_FAIL_COND( get_active()!=this );\n\n ")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, bool p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value?1:0); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, float p_value) { _FU glUniform1f(get_uniform(p_uniform),p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, double p_value) { _FU glUniform1f(get_uniform(p_uniform),p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, uint8_t p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, int8_t p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, uint16_t p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, int16_t p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, uint32_t p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, int32_t p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n")
- #fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, uint64_t p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n");
- #fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, int64_t p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n");
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, unsigned long p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, long p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Color& p_color) { _FU GLfloat col[4]={p_color.r,p_color.g,p_color.b,p_color.a}; glUniform4fv(get_uniform(p_uniform),1,col); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Vector2& p_vec2) { _FU GLfloat vec2[2]={p_vec2.x,p_vec2.y}; glUniform2fv(get_uniform(p_uniform),1,vec2); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Vector3& p_vec3) { _FU GLfloat vec3[3]={p_vec3.x,p_vec3.y,p_vec3.z}; glUniform3fv(get_uniform(p_uniform),1,vec3); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Plane& p_plane) { _FU GLfloat plane[4]={p_plane.normal.x,p_plane.normal.y,p_plane.normal.z,p_plane.d}; glUniform4fv(get_uniform(p_uniform),1,plane); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, float p_a, float p_b) { _FU glUniform2f(get_uniform(p_uniform),p_a,p_b); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, float p_a, float p_b, float p_c) { _FU glUniform3f(get_uniform(p_uniform),p_a,p_b,p_c); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, float p_a, float p_b, float p_c, float p_d) { _FU glUniform4f(get_uniform(p_uniform),p_a,p_b,p_c,p_d); }\n\n")
-
- fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Transform& p_transform) { _FU
-
- const Transform &tr = p_transform;
-
- GLfloat matrix[16]={ /* build a 16x16 matrix */
- tr.basis.elements[0][0],
- tr.basis.elements[1][0],
- tr.basis.elements[2][0],
- 0,
- tr.basis.elements[0][1],
- tr.basis.elements[1][1],
- tr.basis.elements[2][1],
- 0,
- tr.basis.elements[0][2],
- tr.basis.elements[1][2],
- tr.basis.elements[2][2],
- 0,
- tr.origin.x,
- tr.origin.y,
- tr.origin.z,
- 1
- };
-
-
- glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix);
-
-
- }
-
- """)
-
- fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Transform2D& p_transform) { _FU
-
- const Transform2D &tr = p_transform;
-
- GLfloat matrix[16]={ /* build a 16x16 matrix */
- tr.elements[0][0],
- tr.elements[0][1],
- 0,
- 0,
- tr.elements[1][0],
- tr.elements[1][1],
- 0,
- 0,
- 0,
- 0,
- 1,
- 0,
- tr.elements[2][0],
- tr.elements[2][1],
- 0,
- 1
- };
-
-
- glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix);
-
-
- }
-
- """)
-
- fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const CameraMatrix& p_matrix) { _FU
-
- GLfloat matrix[16];
-
- for (int i=0;i<4;i++) {
- for (int j=0;j<4;j++) {
-
- matrix[i*4+j]=p_matrix.matrix[i][j];
- }
- }
-
- glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix);
- }; """)
-
- fd.write("\n\n#undef _FU\n\n\n")
-
- fd.write("\tvirtual void init() {\n\n")
- if (len(conditionals)):
-
- fd.write("\t\tstatic const char* _conditional_strings[]={\n")
- if (len(conditionals)):
- for x in conditionals:
- fd.write("\t\t\t\"#define " + x + "\\n\",\n")
- fd.write("\t\t};\n\n")
- else:
- fd.write("\t\tstatic const char **_conditional_strings=NULL;\n")
-
- if (len(uniforms)):
-
- fd.write("\t\tstatic const char* _uniform_strings[]={\n")
- if (len(uniforms)):
- for x in uniforms:
- fd.write("\t\t\t\"" + x + "\",\n")
- fd.write("\t\t};\n\n")
- else:
- fd.write("\t\tstatic const char **_uniform_strings=NULL;\n")
-
- if (len(attributes)):
-
- fd.write("\t\tstatic AttributePair _attribute_pairs[]={\n")
- for x in attributes:
- fd.write("\t\t\t{\"" + x[0] + "\"," + x[1] + "},\n")
- fd.write("\t\t};\n\n")
- else:
- fd.write("\t\tstatic AttributePair *_attribute_pairs=NULL;\n")
-
- if (len(fbos)):
- fd.write("\t\tstatic FBOPair _fbo_pairs[]={\n")
- for x in fbos:
- fd.write("\t\t\t{\"" + x[0] + "\"," + x[1] + "},\n")
- fd.write("\t\t};\n\n")
- else:
- fd.write("\t\tstatic FBOPair *_fbo_pairs=NULL;\n")
-
- if (len(ubos)):
- fd.write("\t\tstatic UBOPair _ubo_pairs[]={\n")
- for x in ubos:
- fd.write("\t\t\t{\"" + x[0] + "\"," + x[1] + "},\n")
- fd.write("\t\t};\n\n")
- else:
- fd.write("\t\tstatic UBOPair *_ubo_pairs=NULL;\n")
-
- if (len(texunits)):
- fd.write("\t\tstatic TexUnitPair _texunit_pairs[]={\n")
- for x in texunits:
- fd.write("\t\t\t{\"" + x[0] + "\"," + x[1] + "},\n")
- fd.write("\t\t};\n\n")
- else:
- fd.write("\t\tstatic TexUnitPair *_texunit_pairs=NULL;\n")
-
- fd.write("\t\tstatic const char* _vertex_code=\"\\\n")
- for x in vertex_lines:
- fd.write("\t\t\t" + x + "\n")
- fd.write("\t\t\";\n\n")
-
- fd.write("\t\tstatic const int _vertex_code_start=" + str(vertex_offset) + ";\n")
-
- fd.write("\t\tstatic const char* _fragment_code=\"\\\n")
- for x in fragment_lines:
- fd.write("\t\t\t" + x + "\n")
- fd.write("\t\t\";\n\n")
-
- fd.write("\t\tstatic const int _fragment_code_start=" + str(fragment_offset) + ";\n")
-
- fd.write("\t\tsetup(_conditional_strings," + str(len(conditionals)) + ",_uniform_strings," + str(len(uniforms)) + ",_attribute_pairs," + str(len(attributes)) + ",_fbo_pairs," + str(len(fbos)) + ",_ubo_pairs," + str(len(ubos)) + ",_texunit_pairs," + str(len(texunits)) + ",_vertex_code,_fragment_code,_vertex_code_start,_fragment_code_start);\n")
- fd.write("\t};\n\n")
-
- fd.write("};\n\n")
- fd.write("#endif\n\n")
- fd.close()
-
-
-def build_glsl_headers(target, source, env):
-
- for x in source:
-
- build_glsl_header(str(x))
-
- return 0
-
-
-def build_hlsl_dx9_header(filename):
-
- fs = open(filename, "r")
- line = fs.readline()
-
- vertex_lines = []
- fragment_lines = []
- uniforms = []
- fragment_uniforms = []
- attributes = []
- fbos = []
- conditionals = []
-
- reading = ""
- line_offset = 0
- vertex_offset = 0
- fragment_offset = 0
-
- while(line):
-
- if (line.find("[vertex]") != -1):
- reading = "vertex"
- line = fs.readline()
- line_offset += 1
- vertex_offset = line_offset
- continue
-
- if (line.find("[fragment]") != -1):
- reading = "fragment"
- line = fs.readline()
- line_offset += 1
- fragment_offset = line_offset
- continue
-
- if (line.find("#ifdef ") != -1):
- ifdefline = line.replace("#ifdef ", "").strip()
- if (not ifdefline in conditionals):
- conditionals += [ifdefline]
-
- if (line.find("#elif defined(") != -1):
- ifdefline = line.replace("#elif defined(", "").strip()
- ifdefline = ifdefline.replace(")", "").strip()
- if (not ifdefline in conditionals):
- conditionals += [ifdefline]
- if (line.find("uniform") != -1):
- uline = line.replace("uniform", "")
- uline = uline.replace(";", "")
- lines = uline.split(",")
- for x in lines:
-
- x = x.strip()
- x = x[x.rfind(" ") + 1:]
- if (x.find("[") != -1):
- # unfiorm array
- x = x[:x.find("[")]
-
- if (not x in uniforms):
- uniforms += [x]
- fragment_uniforms += [reading == "fragment"]
- line = line.replace("\r", "")
- line = line.replace("\n", "")
- line = line.replace("\\", "\\\\")
- line = line.replace("\"", "\\\"")
- line = line + "\\n\\"
-
- if (reading == "vertex"):
- vertex_lines += [line]
- if (reading == "fragment"):
- fragment_lines += [line]
-
- line = fs.readline()
- line_offset += 1
-
- fs.close()
-
- out_file = filename + ".gen.h"
- fd = open(out_file, "w")
-
- fd.write("/* WARNING, THIS FILE WAS GENERATED, DO NOT EDIT */\n")
-
- out_file_base = out_file
- out_file_base = out_file_base[out_file_base.rfind("/") + 1:]
- out_file_base = out_file_base[out_file_base.rfind("\\") + 1:]
-# print("out file "+out_file+" base " +out_file_base)
- out_file_ifdef = out_file_base.replace(".", "_").upper()
- fd.write("#ifndef " + out_file_ifdef + "\n")
- fd.write("#define " + out_file_ifdef + "\n")
-
- out_file_class = out_file_base.replace(".hlsl.h", "").title().replace("_", "").replace(".", "") + "ShaderDX9"
- fd.write("\n\n")
- fd.write("#include \"drivers/directx9/shader_dx9.h\"\n\n\n")
- fd.write("class " + out_file_class + " : public ShaderDX9 {\n\n")
- fd.write("\t virtual String get_shader_name() const { return \"" + out_file_class + "\"; }\n")
- fd.write("public:\n\n")
-
- if (len(conditionals)):
- fd.write("\tenum Conditionals {\n")
- for x in conditionals:
- fd.write("\t\t" + x + ",\n")
- fd.write("\t};\n\n")
- if (len(uniforms)):
- fd.write("\tenum Uniforms {\n")
- for x in uniforms:
- fd.write("\t\t" + x.upper() + ",\n")
- fd.write("\t};\n\n")
-
- if (len(conditionals)):
- fd.write("\t_FORCE_INLINE_ void set_conditional(Conditionals p_conditional,bool p_enable) { _set_conditional(p_conditional,p_enable); }\n\n")
-
- fd.write("\t#define _FU if (!_uniform_valid(p_uniform)) return; ERR_FAIL_COND( get_active()!=this );\n\n ")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, bool p_value) { _FU set_uniformb(p_uniform,p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, float p_value) { _FU set_uniformf(p_uniform,p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, double p_value) { _FU set_uniformf(p_uniform,p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, uint8_t p_value) { _FU set_uniformi(p_uniform,p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, int8_t p_value) { _FU set_uniformi(p_uniform,p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, uint16_t p_value) { _FU set_uniformi(p_uniform,p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, int16_t p_value) { _FU set_uniformi(p_uniform,p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, uint32_t p_value) { _FU set_uniformi(p_uniform,p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, int32_t p_value) { _FU set_uniformi(p_uniform,p_value); }\n\n")
- #fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, uint64_t p_value) { _FU set_uniformi(p_uniform,p_value); }\n\n");
- #fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, int64_t p_value) { _FU set_uniformi(p_uniform,p_value); }\n\n");
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, unsigned long p_value) { _FU set_uniformi(p_uniform,p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, long p_value) { _FU set_uniformi(p_uniform,p_value); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Color& p_color) { _FU float col[4]={p_color.r,p_color.g,p_color.b,p_color.a}; set_uniformfv(p_uniform,col); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Vector2& p_vec2) { _FU float vec2[4]={p_vec2.x,p_vec2.y,0,0}; set_uniformfv(p_uniform,vec2); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Vector3& p_vec3) { _FU float vec3[4]={p_vec3.x,p_vec3.y,p_vec3.z,0}; set_uniformfv(p_uniform,vec3); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, float p_a, float p_b) { _FU float vec2[4]={p_a,p_b,0,0}; set_uniformfv(p_uniform,vec2); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, float p_a, float p_b, float p_c) { _FU float vec3[4]={p_a,p_b,p_c,0}; set_uniformfv(p_uniform,vec3); }\n\n")
- fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, float p_a, float p_b, float p_c, float p_d) { _FU float vec4[4]={p_a,p_b,p_c,p_d}; set_uniformfv(p_uniform,vec4); }\n\n")
-
- fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Transform& p_transform) { _FU
-
- const Transform &tr = p_transform;
-
- float matrix[16]={ /* build a 16x16 matrix */
- tr.basis.elements[0][0],
- tr.basis.elements[0][1],
- tr.basis.elements[0][2],
- tr.origin.x,
- tr.basis.elements[1][0],
- tr.basis.elements[1][1],
- tr.basis.elements[1][2],
- tr.origin.y,
- tr.basis.elements[2][0],
- tr.basis.elements[2][1],
- tr.basis.elements[2][2],
- tr.origin.z,
- 0,
- 0,
- 0,
- 1
- };
-
- set_uniformfv(p_uniform,&matrix[0],4);
-
- }
-
- """)
-
- fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const CameraMatrix& p_matrix) { _FU
-
- float matrix[16];
-
- for (int i=0;i<4;i++) {
- for (int j=0;j<4;j++) {
-
- matrix[i*4+j]=p_matrix.matrix[j][i];
- }
- }
-
- set_uniformfv(p_uniform,&matrix[0],4);
- }; """)
-
- fd.write("\n\n#undef _FU\n\n\n")
-
- fd.write("\tvirtual void init(IDirect3DDevice9 *p_device,ShaderSupport p_version) {\n\n")
- if (len(conditionals)):
-
- fd.write("\t\tstatic const char* _conditional_strings[]={\n")
- if (len(conditionals)):
- for x in conditionals:
- fd.write("\t\t\t\"" + x + "\",\n")
- fd.write("\t\t};\n\n")
- else:
- fd.write("\t\tstatic const char **_conditional_strings=NULL;\n")
-
- if (len(uniforms)):
-
- fd.write("\t\tstatic const char* _uniform_strings[]={\n")
- if (len(uniforms)):
- for x in uniforms:
- fd.write("\t\t\t\"" + x + "\",\n")
- fd.write("\t\t};\n\n")
-
- fd.write("\t\tstatic const bool _fragment_uniforms[]={\n")
-
- if (len(uniforms)):
- for x in fragment_uniforms:
- if (x):
- fd.write("\t\t\ttrue,\n")
- else:
- fd.write("\t\t\tfalse,\n")
- fd.write("\t\t};\n\n")
- else:
- fd.write("\t\tstatic const char **_uniform_strings=NULL;\n")
- fd.write("\t\tstatic const bool *_fragment_uniforms=NULL;\n")
-
- fd.write("\t\tstatic const char* _vertex_code=\"\\\n")
- for x in vertex_lines:
- fd.write("\t\t\t" + x + "\n")
- fd.write("\t\t\";\n\n")
-
- fd.write("\t\tstatic const int _vertex_code_start=" + str(vertex_offset) + ";\n")
-
- fd.write("\t\tstatic const char* _fragment_code=\"\\\n")
- for x in fragment_lines:
- fd.write("\t\t\t" + x + "\n")
- fd.write("\t\t\";\n\n")
-
- fd.write("\t\tstatic const int _fragment_code_start=" + str(fragment_offset) + ";\n")
-
- fd.write("\t\tsetup(p_device,p_version,_conditional_strings," + str(len(conditionals)) + ",_uniform_strings," + str(len(uniforms)) + ",_fragment_uniforms,_vertex_code,_fragment_code,_vertex_code_start,_fragment_code_start);\n")
- fd.write("\t};\n\n")
-
- fd.write("};\n\n")
- fd.write("#endif\n\n")
- fd.close()
-
-
-def build_hlsl_dx9_headers(target, source, env):
-
- for x in source:
-
- build_hlsl_dx9_header(str(x))
-
- return 0
-
class LegacyGLHeaderStruct:
@@ -840,7 +209,7 @@ def include_file_in_legacygl_header(filename, header_data, depth):
return header_data
-def build_legacygl_header(filename, include, class_suffix, output_attribs):
+def build_legacygl_header(filename, include, class_suffix, output_attribs, gles2=False):
header_data = LegacyGLHeaderStruct()
include_file_in_legacygl_header(filename, header_data, 0)
@@ -928,14 +297,14 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs):
};
- glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix);
+ glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix);
}
""")
- fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Transform2D& p_transform) { _FU
+ fd.write("""_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Transform2D& p_transform) { _FU
const Transform2D &tr = p_transform;
@@ -959,14 +328,14 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs):
};
- glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix);
+ glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix);
}
""")
- fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const CameraMatrix& p_matrix) { _FU
+ fd.write("""_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const CameraMatrix& p_matrix) { _FU
GLfloat matrix[16];
@@ -978,7 +347,7 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs):
}
glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix);
- }; """)
+ } """)
fd.write("\n\n#undef _FU\n\n\n")
@@ -1061,7 +430,7 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs):
feedback_count = 0
- if (len(header_data.feedbacks)):
+ if (not gles2 and len(header_data.feedbacks)):
fd.write("\t\tstatic const Feedback _feedbacks[]={\n")
for x in header_data.feedbacks:
@@ -1076,7 +445,10 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs):
fd.write("\t\t};\n\n")
else:
- fd.write("\t\tstatic const Feedback* _feedbacks=NULL;\n")
+ if gles2:
+ pass
+ else:
+ fd.write("\t\tstatic const Feedback* _feedbacks=NULL;\n")
if (len(header_data.texunits)):
fd.write("\t\tstatic TexUnitPair _texunit_pairs[]={\n")
@@ -1086,13 +458,16 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs):
else:
fd.write("\t\tstatic TexUnitPair *_texunit_pairs=NULL;\n")
- if (len(header_data.ubos)):
+ if (not gles2 and len(header_data.ubos)):
fd.write("\t\tstatic UBOPair _ubo_pairs[]={\n")
for x in header_data.ubos:
fd.write("\t\t\t{\"" + x[0] + "\"," + x[1] + "},\n")
fd.write("\t\t};\n\n")
else:
- fd.write("\t\tstatic UBOPair *_ubo_pairs=NULL;\n")
+ if gles2:
+ pass
+ else:
+ fd.write("\t\tstatic UBOPair *_ubo_pairs=NULL;\n")
fd.write("\t\tstatic const char _vertex_code[]={\n")
for x in header_data.vertex_lines:
@@ -1115,11 +490,17 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs):
fd.write("\t\tstatic const int _fragment_code_start=" + str(header_data.fragment_offset) + ";\n")
if output_attribs:
- fd.write("\t\tsetup(_conditional_strings," + str(len(header_data.conditionals)) + ",_uniform_strings," + str(len(header_data.uniforms)) + ",_attribute_pairs," + str(len(header_data.attributes)) + ", _texunit_pairs," + str(len(header_data.texunits)) + ",_ubo_pairs," + str(len(header_data.ubos)) + ",_feedbacks," + str(feedback_count) + ",_vertex_code,_fragment_code,_vertex_code_start,_fragment_code_start);\n")
+ if gles2:
+ fd.write("\t\tsetup(_conditional_strings," + str(len(header_data.conditionals)) + ",_uniform_strings," + str(len(header_data.uniforms)) + ",_attribute_pairs," + str(len(header_data.attributes)) + ", _texunit_pairs," + str(len(header_data.texunits)) + ",_vertex_code,_fragment_code,_vertex_code_start,_fragment_code_start);\n")
+ else:
+ fd.write("\t\tsetup(_conditional_strings," + str(len(header_data.conditionals)) + ",_uniform_strings," + str(len(header_data.uniforms)) + ",_attribute_pairs," + str(len(header_data.attributes)) + ", _texunit_pairs," + str(len(header_data.texunits)) + ",_ubo_pairs," + str(len(header_data.ubos)) + ",_feedbacks," + str(feedback_count) + ",_vertex_code,_fragment_code,_vertex_code_start,_fragment_code_start);\n")
else:
- fd.write("\t\tsetup(_conditional_strings," + str(len(header_data.conditionals)) + ",_uniform_strings," + str(len(header_data.uniforms)) + ",_texunit_pairs," + str(len(header_data.texunits)) + ",_enums," + str(len(header_data.enums)) + ",_enum_values," + str(enum_value_count) + ",_ubo_pairs," + str(len(header_data.ubos)) + ",_feedbacks," + str(feedback_count) + ",_vertex_code,_fragment_code,_vertex_code_start,_fragment_code_start);\n")
+ if gles2:
+ fd.write("\t\tsetup(_conditional_strings," + str(len(header_data.conditionals)) + ",_uniform_strings," + str(len(header_data.uniforms)) + ",_texunit_pairs," + str(len(header_data.texunits)) + ",_enums," + str(len(header_data.enums)) + ",_enum_values," + str(enum_value_count) + ",_vertex_code,_fragment_code,_vertex_code_start,_fragment_code_start);\n")
+ else:
+ fd.write("\t\tsetup(_conditional_strings," + str(len(header_data.conditionals)) + ",_uniform_strings," + str(len(header_data.uniforms)) + ",_texunit_pairs," + str(len(header_data.texunits)) + ",_enums," + str(len(header_data.enums)) + ",_enum_values," + str(enum_value_count) + ",_ubo_pairs," + str(len(header_data.ubos)) + ",_feedbacks," + str(feedback_count) + ",_vertex_code,_fragment_code,_vertex_code_start,_fragment_code_start);\n")
- fd.write("\t};\n\n")
+ fd.write("\t}\n\n")
if (len(enum_constants)):
@@ -1134,20 +515,16 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs):
fd.close()
-def build_legacygl_headers(target, source, env):
+def build_gles3_headers(target, source, env):
for x in source:
-
- build_legacygl_header(str(x), include="drivers/legacygl/shader_lgl.h", class_suffix="LGL", output_attribs=False)
-
- return 0
+ build_legacygl_header(str(x), include="drivers/gles3/shader_gles3.h", class_suffix="GLES3", output_attribs=True)
-def build_gles3_headers(target, source, env):
+def build_gles2_headers(target, source, env):
for x in source:
- build_legacygl_header(str(x), include="drivers/gles3/shader_gles3.h", class_suffix="GLES3", output_attribs=True)
-
+ build_legacygl_header(str(x), include="drivers/gles2/shader_gles2.h", class_suffix="GLES2", output_attribs=True, gles2=True)
def add_module_version_string(self,s):
self.module_version_string += "." + s
@@ -1220,45 +597,6 @@ def parse_cg_file(fname, uniforms, sizes, conditionals):
line = fs.readline()
-
-def build_cg_shader(sname):
-
- vp_uniforms = []
- vp_uniform_sizes = []
- vp_conditionals = []
-
- parse_cg_file("vp_" + sname + ".cg", vp_uniforms, vp_uniform_sizes, vp_conditionals)
-
- fp_uniforms = []
- fp_uniform_sizes = []
- fp_conditionals = []
-
- parse_cg_file("fp_" + sname + ".cg", fp_uniforms, fp_uniform_sizes, fp_conditionals)
-
- fd = open("shader_" + sname + ".cg.gen.h", "w")
-
- fd.write('\n#include "shader_cell.h"\n')
- fd.write("\nclass Shader_" + sname + " : public ShaderCell {\n")
- fd.write("\n\tstatic struct VertexUniforms[] = {\n")
-
- offset = 0
- for i in range(0, len(vp_uniforms)):
-
- fd.write('\t\t{ "%s", %d, %d },\n' % (vp_uniforms[i], offset, vp_uniform_sizes[i]))
- offset = offset + vp_uniform_sizes[i]
- fd.write("\t};\n\n")
-
- fd.write("public:\n\n")
-
- fd.write("\tenum {\n")
-
- for i in range(0, len(vp_uniforms)):
-
- fd.write('\t\tVP_%s,\n' % vp_uniforms[i].upper())
-
- fd.write("\t};\n")
-
-
import glob
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp
index 61ce26e9fd..4a0c7499b4 100644
--- a/modules/bullet/bullet_physics_server.cpp
+++ b/modules/bullet/bullet_physics_server.cpp
@@ -619,11 +619,11 @@ uint32_t BulletPhysicsServer::body_get_collision_mask(RID p_body) const {
}
void BulletPhysicsServer::body_set_user_flags(RID p_body, uint32_t p_flags) {
- WARN_PRINT("This function si not currently supported by bullet and Godot");
+ // This function si not currently supported
}
uint32_t BulletPhysicsServer::body_get_user_flags(RID p_body) const {
- WARN_PRINT("This function si not currently supported by bullet and Godot");
+ // This function si not currently supported
return 0;
}
@@ -784,21 +784,26 @@ int BulletPhysicsServer::body_get_max_contacts_reported(RID p_body) const {
}
void BulletPhysicsServer::body_set_contacts_reported_depth_threshold(RID p_body, float p_threshold) {
- WARN_PRINT("Not supported by bullet and even Godot");
+ // Not supported by bullet and even Godot
}
float BulletPhysicsServer::body_get_contacts_reported_depth_threshold(RID p_body) const {
- WARN_PRINT("Not supported by bullet and even Godot");
+ // Not supported by bullet and even Godot
return 0.;
}
void BulletPhysicsServer::body_set_omit_force_integration(RID p_body, bool p_omit) {
- WARN_PRINT("Not supported by bullet");
+ RigidBodyBullet *body = rigid_body_owner.get(p_body);
+ ERR_FAIL_COND(!body);
+
+ body->set_omit_forces_integration(p_omit);
}
bool BulletPhysicsServer::body_is_omitting_force_integration(RID p_body) const {
- WARN_PRINT("Not supported by bullet");
- return false;
+ RigidBodyBullet *body = rigid_body_owner.get(p_body);
+ ERR_FAIL_COND_V(!body, false);
+
+ return body->get_omit_forces_integration();
}
void BulletPhysicsServer::body_set_force_integration_callback(RID p_body, Object *p_receiver, const StringName &p_method, const Variant &p_udata) {
@@ -979,11 +984,11 @@ PhysicsServer::JointType BulletPhysicsServer::joint_get_type(RID p_joint) const
}
void BulletPhysicsServer::joint_set_solver_priority(RID p_joint, int p_priority) {
- //WARN_PRINTS("Joint priority not supported by bullet");
+ // Joint priority not supported by bullet
}
int BulletPhysicsServer::joint_get_solver_priority(RID p_joint) const {
- //WARN_PRINTS("Joint priority not supported by bullet");
+ // Joint priority not supported by bullet
return 0;
}
diff --git a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
index 8c8647e097..a4dc61d0bc 100644
--- a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
+++ b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BulletPhysicsDirectBodyState" inherits="PhysicsDirectBodyState" category="Core" version="3.1-dev">
+<class name="BulletPhysicsDirectBodyState" inherits="PhysicsDirectBodyState" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/bullet/doc_classes/BulletPhysicsServer.xml b/modules/bullet/doc_classes/BulletPhysicsServer.xml
index 8ed84e1dec..1486936cf4 100644
--- a/modules/bullet/doc_classes/BulletPhysicsServer.xml
+++ b/modules/bullet/doc_classes/BulletPhysicsServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BulletPhysicsServer" inherits="PhysicsServer" category="Core" version="3.1-dev">
+<class name="BulletPhysicsServer" inherits="PhysicsServer" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp
index 7c051f8f17..72c982bb0b 100644
--- a/modules/bullet/godot_result_callbacks.cpp
+++ b/modules/bullet/godot_result_callbacks.cpp
@@ -257,18 +257,15 @@ btScalar GodotRestInfoContactResultCallback::addSingleResult(btManifoldPoint &cp
void GodotDeepPenetrationContactResultCallback::addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorldOnB, btScalar depth) {
- if (depth < 0) {
- // Has penetration
- if (m_most_penetrated_distance > depth) {
-
- bool isSwapped = m_manifoldPtr->getBody0() != m_body0Wrap->getCollisionObject();
-
- m_most_penetrated_distance = depth;
- m_pointCollisionObject = (isSwapped ? m_body0Wrap : m_body1Wrap)->getCollisionObject();
- m_other_compound_shape_index = isSwapped ? m_index1 : m_index0;
- m_pointNormalWorld = isSwapped ? normalOnBInWorld * -1 : normalOnBInWorld;
- m_pointWorld = isSwapped ? (pointInWorldOnB + normalOnBInWorld * depth) : pointInWorldOnB;
- m_penetration_distance = depth;
- }
+ // Has penetration
+ if (m_penetration_distance < ABS(depth)) {
+
+ bool isSwapped = m_manifoldPtr->getBody0() != m_body0Wrap->getCollisionObject();
+
+ m_penetration_distance = depth;
+ m_pointCollisionObject = (isSwapped ? m_body0Wrap : m_body1Wrap)->getCollisionObject();
+ m_other_compound_shape_index = isSwapped ? m_index1 : m_index0;
+ m_pointNormalWorld = isSwapped ? normalOnBInWorld * -1 : normalOnBInWorld;
+ m_pointWorld = isSwapped ? (pointInWorldOnB + normalOnBInWorld * depth) : pointInWorldOnB;
}
}
diff --git a/modules/bullet/godot_result_callbacks.h b/modules/bullet/godot_result_callbacks.h
index ed6d4b7d6d..60493d4788 100644
--- a/modules/bullet/godot_result_callbacks.h
+++ b/modules/bullet/godot_result_callbacks.h
@@ -187,18 +187,15 @@ struct GodotDeepPenetrationContactResultCallback : public btManifoldResult {
int m_other_compound_shape_index;
const btCollisionObject *m_pointCollisionObject;
- btScalar m_most_penetrated_distance;
-
GodotDeepPenetrationContactResultCallback(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap) :
btManifoldResult(body0Wrap, body1Wrap),
m_pointCollisionObject(NULL),
m_penetration_distance(0),
- m_other_compound_shape_index(0),
- m_most_penetrated_distance(1e20) {}
+ m_other_compound_shape_index(0) {}
void reset() {
m_pointCollisionObject = NULL;
- m_most_penetrated_distance = 1e20;
+ m_penetration_distance = 0;
}
bool hasHit() {
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 75b4cc054a..2494063c22 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -255,6 +255,7 @@ RigidBodyBullet::RigidBodyBullet() :
linearDamp(0),
angularDamp(0),
can_sleep(true),
+ omit_forces_integration(false),
force_integration_callback(NULL),
isTransformChanged(false),
previousActiveState(true),
@@ -334,6 +335,9 @@ void RigidBodyBullet::dispatch_callbacks() {
/// The check isTransformChanged is necessary in order to call integrated forces only when the first transform is sent
if ((btBody->isActive() || previousActiveState != btBody->isActive()) && force_integration_callback && isTransformChanged) {
+ if (omit_forces_integration)
+ btBody->clearForces();
+
BulletPhysicsDirectBodyState *bodyDirect = BulletPhysicsDirectBodyState::get_singleton(this);
Variant variantBodyDirect = bodyDirect;
@@ -437,6 +441,10 @@ bool RigidBodyBullet::is_active() const {
return btBody->isActive();
}
+void RigidBodyBullet::set_omit_forces_integration(bool p_omit) {
+ omit_forces_integration = p_omit;
+}
+
void RigidBodyBullet::set_param(PhysicsServer::BodyParameter p_param, real_t p_value) {
switch (p_param) {
case PhysicsServer::BODY_PARAM_BOUNCE:
diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h
index 2d529f6dc7..b9511243c7 100644
--- a/modules/bullet/rigid_body_bullet.h
+++ b/modules/bullet/rigid_body_bullet.h
@@ -198,6 +198,7 @@ private:
real_t linearDamp;
real_t angularDamp;
bool can_sleep;
+ bool omit_forces_integration;
Vector<CollisionData> collisions;
// these parameters are used to avoid vector resize
@@ -254,6 +255,9 @@ public:
void set_activation_state(bool p_active);
bool is_active() const;
+ void set_omit_forces_integration(bool p_omit);
+ _FORCE_INLINE_ bool get_omit_forces_integration() const { return omit_forces_integration; }
+
void set_param(PhysicsServer::BodyParameter p_param, real_t);
real_t get_param(PhysicsServer::BodyParameter p_param) const;
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index e20a79f667..8c15758e0f 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -790,7 +790,7 @@ void SpaceBullet::update_gravity() {
/// I'm leaving this here just for future tests.
/// Debug motion and normal vector drawing
#define debug_test_motion 0
-#define PERFORM_INITIAL_UNSTACK 0
+
#define RECOVERING_MOVEMENT_SCALE 0.4
#define RECOVERING_MOVEMENT_CYCLES 4
@@ -842,7 +842,6 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
G_TO_B(p_from, body_safe_position);
UNSCALE_BT_BASIS(body_safe_position);
-#if PERFORM_INITIAL_UNSTACK
btVector3 recover_initial_position(0, 0, 0);
{ /// Phase one - multi shapes depenetration using margin
for (int t(RECOVERING_MOVEMENT_CYCLES); 0 < t; --t) {
@@ -854,7 +853,6 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
// Add recover movement in order to make it safe
body_safe_position.getOrigin() += recover_initial_position;
}
-#endif
btVector3 motion;
G_TO_B(p_motion, motion);
@@ -893,7 +891,7 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
btResult.m_collisionFilterGroup = p_body->get_collision_layer();
btResult.m_collisionFilterMask = p_body->get_collision_mask();
- dynamicsWorld->convexSweepTest(convex_shape_test, shape_world_from, shape_world_to, btResult, 0.002);
+ dynamicsWorld->convexSweepTest(convex_shape_test, shape_world_from, shape_world_to, btResult, dynamicsWorld->getDispatchInfo().m_allowedCcdPenetration);
if (btResult.hasHit()) {
/// Since for each sweep test I fix the motion of new shapes in base the recover result,
@@ -918,11 +916,8 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
l_has_penetration = recover_from_penetration(p_body, body_safe_position, RECOVERING_MOVEMENT_SCALE, p_infinite_inertia, delta_recover_movement, &r_recover_result);
if (r_result) {
-#if PERFORM_INITIAL_UNSTACK
B_TO_G(motion + delta_recover_movement + recover_initial_position, r_result->motion);
-#else
- B_TO_G(motion + delta_recover_movement, r_result->motion);
-#endif
+
if (l_has_penetration) {
has_penetration = true;
if (l_penetration_distance <= r_recover_result.penetration_distance) {
@@ -1112,7 +1107,7 @@ bool SpaceBullet::RFP_convex_world_test(const btConvexShape *p_shapeA, const btC
btCollisionObjectWrapper obA(NULL, p_shapeA, p_objectA, tA, -1, p_shapeId_A);
btCollisionObjectWrapper obB(NULL, p_shapeB, p_objectB, p_transformB, -1, p_shapeId_B);
- btCollisionAlgorithm *algorithm = dispatcher->findAlgorithm(&obA, &obB, NULL, BT_CLOSEST_POINT_ALGORITHMS);
+ btCollisionAlgorithm *algorithm = dispatcher->findAlgorithm(&obA, &obB, NULL, BT_CONTACT_POINT_ALGORITHMS);
if (algorithm) {
GodotDeepPenetrationContactResultCallback contactPointResult(&obA, &obB);
//discrete collision detection query
@@ -1122,7 +1117,7 @@ bool SpaceBullet::RFP_convex_world_test(const btConvexShape *p_shapeA, const btC
dispatcher->freeCollisionAlgorithm(algorithm);
if (contactPointResult.hasHit()) {
- r_delta_recover_movement += contactPointResult.m_pointNormalWorld * (contactPointResult.m_penetration_distance * -1 * p_recover_movement_scale);
+ r_delta_recover_movement += contactPointResult.m_pointNormalWorld * (contactPointResult.m_penetration_distance * p_recover_movement_scale);
if (r_recover_result) {
if (contactPointResult.m_penetration_distance < r_recover_result->penetration_distance) {
diff --git a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
index 55a7a1ac77..5f94353840 100644
--- a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
+++ b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" category="Core" version="3.1-dev">
+<class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" category="Core" version="3.1">
<brief_description>
PacketPeer implementation using the ENet library.
</brief_description>
<description>
- A connection (or a listening server) that should be passed to [method SceneTree.set_network_peer]. Socket events can be handled by connecting to [SceneTree] signals.
+ A PacketPeer implementation that should be passed to [method SceneTree.set_network_peer] after being initialized as either a client or server. Events can then be handled by connecting to [SceneTree] signals.
</description>
<tutorials>
+ http://docs.godotengine.org/en/3.0/tutorials/networking/high_level_multiplayer.html
+ http://enet.bespin.org/usergroup0.html
</tutorials>
<demos>
</demos>
@@ -15,6 +17,7 @@
<return type="void">
</return>
<description>
+ Closes the connection. Ignored if no connection is currently established. If this is a server it tries to notify all clients before forcibly disconnecting them. If this is a client it simply closes the connection to the server.
</description>
</method>
<method name="create_client">
@@ -29,7 +32,7 @@
<argument index="3" name="out_bandwidth" type="int" default="0">
</argument>
<description>
- Create client that connects to a server at address [code]ip[/code] using specified [code]port[/code].
+ Create client that connects to a server at address [code]ip[/code] using specified [code]port[/code]. The given IP needs to be in IPv4 or IPv6 address format, for example: [code]192.168.1.1[/code]. The [code]port[/code] is the port the server is listening on. The [code]in_bandwidth[/code] and [code]out_bandwidth[/code] parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time.
</description>
</method>
<method name="create_server">
@@ -44,7 +47,7 @@
<argument index="3" name="out_bandwidth" type="int" default="0">
</argument>
<description>
- Create server that listens to connections via [code]port[/code].
+ Create server that listens to connections via [code]port[/code]. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use [method set_bind_ip]. The default IP is the wildcard [code]*[/code], which listens on all available interfaces. [code]max_clients[/code] is the maximum number of clients that are allowed at once, any number up to 4096 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see [method create_client].
</description>
</method>
<method name="set_bind_ip">
@@ -53,23 +56,30 @@
<argument index="0" name="ip" type="String">
</argument>
<description>
+ The IP used when creating a server. This is set to the wildcard [code]*[/code] by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: [code]192.168.1.1[/code].
</description>
</method>
</methods>
<members>
<member name="compression_mode" type="int" setter="set_compression_mode" getter="get_compression_mode" enum="NetworkedMultiplayerENet.CompressionMode">
+ The compression method used for network packets. Default is no compression. 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.
</member>
</members>
<constants>
<constant name="COMPRESS_NONE" value="0" enum="CompressionMode">
+ No compression.
</constant>
<constant name="COMPRESS_RANGE_CODER" value="1" enum="CompressionMode">
+ ENet's buildin range encoding.
</constant>
<constant name="COMPRESS_FASTLZ" value="2" enum="CompressionMode">
+ FastLZ compression.
</constant>
<constant name="COMPRESS_ZLIB" value="3" enum="CompressionMode">
+ zlib compression.
</constant>
<constant name="COMPRESS_ZSTD" value="4" enum="CompressionMode">
+ ZStandard compression.
</constant>
</constants>
</class>
diff --git a/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml b/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
index 998460eee1..be86ff0541 100644
--- a/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
+++ b/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRInterfaceGDNative" inherits="ARVRInterface" category="Core" version="3.1-dev">
+<class name="ARVRInterfaceGDNative" inherits="ARVRInterface" category="Core" version="3.1">
<brief_description>
GDNative wrapper for an ARVR interface
</brief_description>
diff --git a/modules/gdnative/doc_classes/GDNative.xml b/modules/gdnative/doc_classes/GDNative.xml
index 4e87cbf450..ca0457623f 100644
--- a/modules/gdnative/doc_classes/GDNative.xml
+++ b/modules/gdnative/doc_classes/GDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDNative" inherits="Reference" category="Core" version="3.1-dev">
+<class name="GDNative" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/GDNativeLibrary.xml b/modules/gdnative/doc_classes/GDNativeLibrary.xml
index ca1bae0598..308d8defc3 100644
--- a/modules/gdnative/doc_classes/GDNativeLibrary.xml
+++ b/modules/gdnative/doc_classes/GDNativeLibrary.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDNativeLibrary" inherits="Resource" category="Core" version="3.1-dev">
+<class name="GDNativeLibrary" inherits="Resource" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/NativeScript.xml b/modules/gdnative/doc_classes/NativeScript.xml
index 6a71cd8d4d..1d3053244b 100644
--- a/modules/gdnative/doc_classes/NativeScript.xml
+++ b/modules/gdnative/doc_classes/NativeScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NativeScript" inherits="Script" category="Core" version="3.1-dev">
+<class name="NativeScript" inherits="Script" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/PluginScript.xml b/modules/gdnative/doc_classes/PluginScript.xml
index 3783d9d0a4..27c6adae3f 100644
--- a/modules/gdnative/doc_classes/PluginScript.xml
+++ b/modules/gdnative/doc_classes/PluginScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PluginScript" inherits="Script" category="Core" version="3.1-dev">
+<class name="PluginScript" inherits="Script" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index f2e9bef467..5806ee3f3f 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -958,6 +958,7 @@ void NativeScriptLanguage::_unload_stuff(bool p_reload) {
NativeScriptLanguage::NativeScriptLanguage() {
NativeScriptLanguage::singleton = this;
#ifndef NO_THREADS
+ has_objects_to_register = false;
mutex = Mutex::create();
#endif
}
diff --git a/modules/gdscript/doc_classes/GDScript.xml b/modules/gdscript/doc_classes/GDScript.xml
index 0dc69c3688..40a435f459 100644
--- a/modules/gdscript/doc_classes/GDScript.xml
+++ b/modules/gdscript/doc_classes/GDScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScript" inherits="Script" category="Core" version="3.1-dev">
+<class name="GDScript" inherits="Script" category="Core" version="3.1">
<brief_description>
A script implemented in the GDScript programming language.
</brief_description>
diff --git a/modules/gdscript/doc_classes/GDScriptFunctionState.xml b/modules/gdscript/doc_classes/GDScriptFunctionState.xml
index 254d968e1b..c205cedef5 100644
--- a/modules/gdscript/doc_classes/GDScriptFunctionState.xml
+++ b/modules/gdscript/doc_classes/GDScriptFunctionState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScriptFunctionState" inherits="Reference" category="Core" version="3.1-dev">
+<class name="GDScriptFunctionState" inherits="Reference" category="Core" version="3.1">
<brief_description>
State of a function call after yielding.
</brief_description>
diff --git a/modules/gdscript/doc_classes/GDScriptNativeClass.xml b/modules/gdscript/doc_classes/GDScriptNativeClass.xml
index 1abcc4762f..90935b5c22 100644
--- a/modules/gdscript/doc_classes/GDScriptNativeClass.xml
+++ b/modules/gdscript/doc_classes/GDScriptNativeClass.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScriptNativeClass" inherits="Reference" category="Core" version="3.1-dev">
+<class name="GDScriptNativeClass" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
index 36d4d7cb59..bb652f3bdf 100644
--- a/modules/gridmap/doc_classes/GridMap.xml
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GridMap" inherits="Spatial" category="Core" version="3.1-dev">
+<class name="GridMap" inherits="Spatial" category="Core" version="3.1">
<brief_description>
Node for 3D tile-based maps.
</brief_description>
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 34d51b51e2..e91c1ebd85 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -101,8 +101,8 @@ void GridMapEditor::_menu_option(int p_option) {
}
if (edit_axis != new_axis) {
- int item1 = options->get_popup()->get_item_id(MENU_OPTION_NEXT_LEVEL);
- int item2 = options->get_popup()->get_item_id(MENU_OPTION_PREV_LEVEL);
+ int item1 = options->get_popup()->get_item_index(MENU_OPTION_NEXT_LEVEL);
+ int item2 = options->get_popup()->get_item_index(MENU_OPTION_PREV_LEVEL);
if (edit_axis == Vector3::AXIS_Y) {
options->get_popup()->set_item_text(item1, TTR("Next Plane"));
options->get_popup()->set_item_text(item2, TTR("Previous Plane"));
@@ -641,12 +641,21 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<Inpu
Ref<InputEventPanGesture> pan_gesture = p_event;
if (pan_gesture.is_valid()) {
- if (pan_gesture->get_command() || pan_gesture->get_shift()) {
- const real_t delta = pan_gesture->get_delta().y;
- floor->set_value(floor->get_value() + SGN(delta));
+ if (pan_gesture->get_alt() && (pan_gesture->get_command() || pan_gesture->get_shift())) {
+ const real_t delta = pan_gesture->get_delta().y * 0.5;
+ accumulated_floor_delta += delta;
+ int step = 0;
+ if (ABS(accumulated_floor_delta) > 1.0) {
+ step = SGN(accumulated_floor_delta);
+ accumulated_floor_delta -= step;
+ }
+ if (step) {
+ floor->set_value(floor->get_value() + step);
+ }
return true;
}
}
+ accumulated_floor_delta = 0.0;
return false;
}
@@ -770,7 +779,7 @@ void GridMapEditor::edit(GridMap *p_gridmap) {
set_process(true);
- Vector3 edited_floor = p_gridmap->get_meta("_editor_floor_");
+ Vector3 edited_floor = p_gridmap->has_meta("_editor_floor_") ? p_gridmap->get_meta("_editor_floor_") : Variant();
clip_mode = p_gridmap->has_meta("_editor_clip_") ? ClipMode(p_gridmap->get_meta("_editor_clip_").operator int()) : CLIP_DISABLED;
for (int i = 0; i < 3; i++) {
@@ -1247,6 +1256,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
selection.active = false;
updating = false;
+ accumulated_floor_delta = 0.0;
}
GridMapEditor::~GridMapEditor() {
diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h
index 9651770528..f79d9aefa0 100644
--- a/modules/gridmap/grid_map_editor_plugin.h
+++ b/modules/gridmap/grid_map_editor_plugin.h
@@ -76,6 +76,7 @@ class GridMapEditor : public VBoxContainer {
Panel *panel;
MenuButton *options;
SpinBox *floor;
+ double accumulated_floor_delta;
ToolButton *mode_thumbnail;
ToolButton *mode_list;
HBoxContainer *spatial_editor_hb;
diff --git a/modules/mbedtls/SCsub b/modules/mbedtls/SCsub
index b846ae38ad..38198c9105 100755
--- a/modules/mbedtls/SCsub
+++ b/modules/mbedtls/SCsub
@@ -85,7 +85,7 @@ if env['builtin_mbedtls']:
thirdparty_dir = "#thirdparty/mbedtls/library/"
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_mbed_tls.add_source_files(env.modules_sources, thirdparty_sources)
- env_mbed_tls.Append(CPPPATH=["#thirdparty/mbedtls/include/"])
+ env_mbed_tls.Prepend(CPPPATH=["#thirdparty/mbedtls/include/"])
# Module sources
env_mbed_tls.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/mobile_vr/config.py b/modules/mobile_vr/config.py
index 4e1155f0c6..aa8ef111d3 100644
--- a/modules/mobile_vr/config.py
+++ b/modules/mobile_vr/config.py
@@ -1,6 +1,6 @@
def can_build(platform):
# should probably change this to only be true on iOS and Android
- return True
+ return False
def configure(env):
pass
diff --git a/modules/mobile_vr/doc_classes/MobileVRInterface.xml b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
index d3f2548320..359d654433 100644
--- a/modules/mobile_vr/doc_classes/MobileVRInterface.xml
+++ b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MobileVRInterface" inherits="ARVRInterface" category="Core" version="3.1-dev">
+<class name="MobileVRInterface" inherits="ARVRInterface" category="Core" version="3.1">
<brief_description>
Generic mobile VR implementation
</brief_description>
diff --git a/modules/mono/SCsub b/modules/mono/SCsub
index e65682484e..a1dfcf6377 100644
--- a/modules/mono/SCsub
+++ b/modules/mono/SCsub
@@ -209,10 +209,16 @@ def mono_build_solution(source, target, env):
copyfile(os.path.join(src_dir, asm_file), os.path.join(dst_dir, asm_file))
+output_dir = Dir('#bin').abspath
+assemblies_output_dir = Dir(env['mono_assemblies_output_dir']).abspath
-mono_sln_builder = Builder(action = mono_build_solution)
+mono_sln_builder = Builder(action=mono_build_solution)
env_mono.Append(BUILDERS={'MonoBuildSolution': mono_sln_builder})
env_mono.MonoBuildSolution(
- os.path.join(Dir('#bin').abspath, 'GodotSharpTools.dll'),
+ os.path.join(assemblies_output_dir, 'GodotSharpTools.dll'),
'editor/GodotSharpTools/GodotSharpTools.sln'
)
+
+if os.path.normpath(output_dir) != os.path.normpath(assemblies_output_dir):
+ rel_assemblies_output_dir = os.path.relpath(assemblies_output_dir, output_dir)
+ env_mono.Append(CPPDEFINES={'GD_MONO_EDITOR_ASSEMBLIES_DIR': rel_assemblies_output_dir})
diff --git a/modules/mono/config.py b/modules/mono/config.py
index 7c1846dcc2..5591ed25bf 100644
--- a/modules/mono/config.py
+++ b/modules/mono/config.py
@@ -2,8 +2,9 @@
import imp
import os
import sys
+import subprocess
-from SCons.Script import BoolVariable, Environment, Variables
+from SCons.Script import BoolVariable, Dir, Environment, PathVariable, Variables
monoreg = imp.load_source('mono_reg_utils', 'modules/mono/mono_reg_utils.py')
@@ -29,20 +30,16 @@ def is_enabled():
return False
-def copy_file_no_replace(src_dir, dst_dir, name):
+def copy_file(src_dir, dst_dir, name):
from shutil import copyfile
src_path = os.path.join(src_dir, name)
dst_path = os.path.join(dst_dir, name)
- need_copy = True
if not os.path.isdir(dst_dir):
os.mkdir(dst_dir)
- elif os.path.exists(dst_path):
- need_copy = False
- if need_copy:
- copyfile(src_path, dst_path)
+ copyfile(src_path, dst_path)
def configure(env):
@@ -51,11 +48,13 @@ def configure(env):
envvars = Variables()
envvars.Add(BoolVariable('mono_static', 'Statically link mono', False))
+ envvars.Add(PathVariable('mono_assemblies_output_dir', 'Path to the assemblies output directory', '#bin', PathVariable.PathIsDirCreate))
envvars.Update(env)
bits = env['bits']
mono_static = env['mono_static']
+ assemblies_output_dir = Dir(env['mono_assemblies_output_dir']).abspath
mono_lib_names = ['mono-2.0-sgen', 'monosgen-2.0']
@@ -99,11 +98,14 @@ def configure(env):
if not mono_dll_name:
raise RuntimeError('Could not find mono shared library in: ' + mono_bin_path)
- copy_file_no_replace(mono_bin_path, 'bin', mono_dll_name + '.dll')
+ copy_file(mono_bin_path, 'bin', mono_dll_name + '.dll')
+
+ copy_file(os.path.join(mono_lib_path, 'mono', '4.5'), assemblies_output_dir, 'mscorlib.dll')
else:
sharedlib_ext = '.dylib' if sys.platform == 'darwin' else '.so'
mono_root = ''
+ mono_lib_path = ''
if bits == '32':
if os.getenv('MONO32_PREFIX'):
@@ -148,7 +150,9 @@ def configure(env):
if not mono_so_name:
raise RuntimeError('Could not find mono shared library in: ' + mono_lib_path)
- copy_file_no_replace(mono_lib_path, 'bin', 'lib' + mono_so_name + sharedlib_ext)
+ copy_file(mono_lib_path, 'bin', 'lib' + mono_so_name + sharedlib_ext)
+
+ copy_file(os.path.join(mono_lib_path, 'mono', '4.5'), assemblies_output_dir, 'mscorlib.dll')
else:
if mono_static:
raise RuntimeError('mono-static: Not supported with pkg-config. Specify a mono prefix manually')
@@ -157,6 +161,7 @@ def configure(env):
mono_lib_path = ''
mono_so_name = ''
+ mono_prefix = subprocess.check_output(["pkg-config", "mono-2", "--variable=prefix"]).strip()
tmpenv = Environment()
tmpenv.AppendENVPath('PKG_CONFIG_PATH', os.getenv('PKG_CONFIG_PATH'))
@@ -172,7 +177,8 @@ def configure(env):
if not mono_so_name:
raise RuntimeError('Could not find mono shared library in: ' + str(tmpenv['LIBPATH']))
- copy_file_no_replace(mono_lib_path, 'bin', 'lib' + mono_so_name + sharedlib_ext)
+ copy_file(mono_lib_path, 'bin', 'lib' + mono_so_name + sharedlib_ext)
+ copy_file(os.path.join(mono_prefix, 'lib', 'mono', '4.5'), assemblies_output_dir, 'mscorlib.dll')
env.Append(LINKFLAGS='-rdynamic')
diff --git a/modules/mono/doc_classes/@C#.xml b/modules/mono/doc_classes/@C#.xml
index 0c2bb948ea..082bc30fd8 100644
--- a/modules/mono/doc_classes/@C#.xml
+++ b/modules/mono/doc_classes/@C#.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@C#" category="Core" version="3.1-dev">
+<class name="@C#" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/mono/doc_classes/CSharpScript.xml b/modules/mono/doc_classes/CSharpScript.xml
index 9bd57f1d4d..a1f7399653 100644
--- a/modules/mono/doc_classes/CSharpScript.xml
+++ b/modules/mono/doc_classes/CSharpScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSharpScript" inherits="Script" category="Core" version="3.1-dev">
+<class name="CSharpScript" inherits="Script" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/mono/doc_classes/GodotSharp.xml b/modules/mono/doc_classes/GodotSharp.xml
index 51f07523e7..985c66464b 100644
--- a/modules/mono/doc_classes/GodotSharp.xml
+++ b/modules/mono/doc_classes/GodotSharp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GodotSharp" inherits="Object" category="Core" version="3.1-dev">
+<class name="GodotSharp" inherits="Object" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp
index e0743346aa..2ce1b0a9df 100644
--- a/modules/mono/mono_gd/gd_mono_assembly.cpp
+++ b/modules/mono/mono_gd/gd_mono_assembly.cpp
@@ -116,6 +116,9 @@ MonoAssembly *GDMonoAssembly::_preload_hook(MonoAssemblyName *aname, char **asse
search_dirs.push_back(GodotSharpDirs::get_res_assemblies_dir());
search_dirs.push_back(OS::get_singleton()->get_resource_dir());
search_dirs.push_back(OS::get_singleton()->get_executable_path().get_base_dir());
+#ifdef GD_MONO_EDITOR_ASSEMBLIES_DIR
+ search_dirs.push_back(OS::get_singleton()->get_executable_path().get_base_dir().plus_file(_MKSTR(GD_MONO_EDITOR_ASSEMBLIES_DIR)).simplify_path());
+#endif
const char *rootdir = mono_assembly_getrootdir();
if (rootdir) {
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index 8fd437223f..4e28622adb 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -201,7 +201,7 @@ Dictionary mono_object_to_Dictionary(MonoObject *p_dict);
m_in.origin.x, m_in.origin.y, m_in.origin.z \
};
#define MARSHALLED_IN_Transform(m_in, m_out) Transform m_out( \
- Basis(m_in[0], m_in[1], m_in[2], m_in[3], m_in[4], m_in[5], m_in[6], m_in[7], m_in[8]), \
+ Basis(m_in[0], m_in[3], m_in[6], m_in[1], m_in[4], m_in[7], m_in[2], m_in[5], m_in[8]), \
Vector3(m_in[9], m_in[10], m_in[11]));
// AABB
diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp
index 297992f625..db136a1313 100644
--- a/modules/mono/mono_gd/gd_mono_utils.cpp
+++ b/modules/mono/mono_gd/gd_mono_utils.cpp
@@ -422,7 +422,7 @@ void print_unhandled_exception(MonoObject *p_exc, bool p_recursion_caution) {
ScriptLanguage::StackInfo separator;
separator.file = "";
- separator.func = "--- " + TTR("End of inner exception stack trace") + " ---";
+ separator.func = "--- " + RTR("End of inner exception stack trace") + " ---";
separator.line = 0;
Vector<ScriptLanguage::StackInfo> si;
diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml
index 26f0501df3..75e8903ff8 100644
--- a/modules/regex/doc_classes/RegEx.xml
+++ b/modules/regex/doc_classes/RegEx.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RegEx" inherits="Reference" category="Core" version="3.1-dev">
+<class name="RegEx" inherits="Reference" category="Core" version="3.1">
<brief_description>
Class for searching text for patterns using regular expressions.
</brief_description>
diff --git a/modules/regex/doc_classes/RegExMatch.xml b/modules/regex/doc_classes/RegExMatch.xml
index 550411d3e0..3d070d2786 100644
--- a/modules/regex/doc_classes/RegExMatch.xml
+++ b/modules/regex/doc_classes/RegExMatch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RegExMatch" inherits="Reference" category="Core" version="3.1-dev">
+<class name="RegExMatch" inherits="Reference" category="Core" version="3.1">
<brief_description>
Contains the results of a regex search.
</brief_description>
diff --git a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
index 8d311ae1b8..ac95a7197f 100644
--- a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
+++ b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamOGGVorbis" inherits="AudioStream" category="Core" version="3.1-dev">
+<class name="AudioStreamOGGVorbis" inherits="AudioStream" category="Core" version="3.1">
<brief_description>
OGG Vorbis audio stream driver.
</brief_description>
diff --git a/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml b/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml
index 5872dd35ff..018f4734ec 100644
--- a/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml
+++ b/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporterOGGVorbis" inherits="ResourceImporter" category="Core" version="3.1-dev">
+<class name="ResourceImporterOGGVorbis" inherits="ResourceImporter" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/theora/doc_classes/ResourceImporterTheora.xml b/modules/theora/doc_classes/ResourceImporterTheora.xml
index 6d2de4a9ad..5fc40a6eba 100644
--- a/modules/theora/doc_classes/ResourceImporterTheora.xml
+++ b/modules/theora/doc_classes/ResourceImporterTheora.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporterTheora" inherits="ResourceImporter" category="Core" version="3.1-dev">
+<class name="ResourceImporterTheora" inherits="ResourceImporter" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/theora/doc_classes/VideoStreamTheora.xml b/modules/theora/doc_classes/VideoStreamTheora.xml
index 550844128d..e7c4727332 100644
--- a/modules/theora/doc_classes/VideoStreamTheora.xml
+++ b/modules/theora/doc_classes/VideoStreamTheora.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStreamTheora" inherits="VideoStream" category="Core" version="3.1-dev">
+<class name="VideoStreamTheora" inherits="VideoStream" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml
index 975b294f30..dab186fb57 100644
--- a/modules/visual_script/doc_classes/VisualScript.xml
+++ b/modules/visual_script/doc_classes/VisualScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScript" inherits="Script" category="Core" version="3.1-dev">
+<class name="VisualScript" inherits="Script" category="Core" version="3.1">
<brief_description>
A script implemented in the Visual Script programming environment.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
index b529589b98..793291eca2 100644
--- a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
A Visual Script node representing a constant from the base types.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
index 9c2ec3b849..0929b227d0 100644
--- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
A Visual Script node used to call built-in functions.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
index dc946cfcbd..2e3a5b33c0 100644
--- a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Gets a constant from a given class.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptComment.xml b/modules/visual_script/doc_classes/VisualScriptComment.xml
index 5c20f27ec2..a4a890ea8a 100644
--- a/modules/visual_script/doc_classes/VisualScriptComment.xml
+++ b/modules/visual_script/doc_classes/VisualScriptComment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptComment" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptComment" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
A Visual Script node used to annotate the script.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptCondition.xml b/modules/visual_script/doc_classes/VisualScriptCondition.xml
index a3313a43d9..353898c93a 100644
--- a/modules/visual_script/doc_classes/VisualScriptCondition.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCondition.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
A Visual Script node which branches the flow.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptConstant.xml b/modules/visual_script/doc_classes/VisualScriptConstant.xml
index 274adb5423..ed633c4135 100644
--- a/modules/visual_script/doc_classes/VisualScriptConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Gets a contant's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptConstructor.xml b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
index 2efe8d9bd6..14c44c6970 100644
--- a/modules/visual_script/doc_classes/VisualScriptConstructor.xml
+++ b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
A Visual Script node which calls a base type constructor.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
index 2165c403d4..b8e77a1b0f 100644
--- a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
A scripted Visual Script node.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
index f076c70715..d3158df357 100644
--- a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
+++ b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
A Visual Script node which deconstructs a base type instance into its parts.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptEditor.xml b/modules/visual_script/doc_classes/VisualScriptEditor.xml
index 1c4542336f..fc49cfc07b 100644
--- a/modules/visual_script/doc_classes/VisualScriptEditor.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEditor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEditor" inherits="Object" category="Core" version="3.1-dev">
+<class name="VisualScriptEditor" inherits="Object" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
index 7eea609db4..4bb05525bd 100644
--- a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Emits a specified signal.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
index 26196f278e..93d7ce3516 100644
--- a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
A Visual Script node returning a singleton from [@GlobalScope]
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptExpression.xml b/modules/visual_script/doc_classes/VisualScriptExpression.xml
index 0b93c3092c..343e83cb55 100644
--- a/modules/visual_script/doc_classes/VisualScriptExpression.xml
+++ b/modules/visual_script/doc_classes/VisualScriptExpression.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptExpression" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptExpression" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunction.xml b/modules/visual_script/doc_classes/VisualScriptFunction.xml
index 18daa42797..ec8e955cf7 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunction.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunction.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunction" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptFunction" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
index dc025cfb27..f6116cf539 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunctionCall" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptFunctionCall" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
index 05e9a6cb81..c75dd0cdbc 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunctionState" inherits="Reference" category="Core" version="3.1-dev">
+<class name="VisualScriptFunctionState" inherits="Reference" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
index d0db8cbab3..9d43204f02 100644
--- a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptGlobalConstant" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptGlobalConstant" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptIndexGet.xml b/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
index 983d8882a7..73c1f47e1a 100644
--- a/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIndexGet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptIndexGet" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptIndexSet.xml b/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
index bc876900f3..652c29a9ac 100644
--- a/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIndexSet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptIndexSet" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptInputAction.xml b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
index 4316bf146d..ab4c23012b 100644
--- a/modules/visual_script/doc_classes/VisualScriptInputAction.xml
+++ b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptInputAction" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptInputAction" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptIterator.xml b/modules/visual_script/doc_classes/VisualScriptIterator.xml
index d815476e2c..7090621bd7 100644
--- a/modules/visual_script/doc_classes/VisualScriptIterator.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIterator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIterator" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptIterator" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Steps through items in a given input.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
index 038fd8c9cd..5c8ee6453c 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptLocalVar" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptLocalVar" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Gets a local variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
index fa65a89c4a..f2e6c48907 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptLocalVarSet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptLocalVarSet" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Changes a local variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
index 243ab03b49..df439f8794 100644
--- a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptMathConstant" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptMathConstant" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Commonly used mathematical constants.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptNode.xml b/modules/visual_script/doc_classes/VisualScriptNode.xml
index c2c5464047..941a0cd91a 100644
--- a/modules/visual_script/doc_classes/VisualScriptNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptNode" inherits="Resource" category="Core" version="3.1-dev">
+<class name="VisualScriptNode" inherits="Resource" category="Core" version="3.1">
<brief_description>
A node which is part of a [VisualScript].
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptOperator.xml b/modules/visual_script/doc_classes/VisualScriptOperator.xml
index 68a57191de..e60d50c977 100644
--- a/modules/visual_script/doc_classes/VisualScriptOperator.xml
+++ b/modules/visual_script/doc_classes/VisualScriptOperator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptOperator" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptOperator" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptPreload.xml b/modules/visual_script/doc_classes/VisualScriptPreload.xml
index 19abc27053..5a2886ccac 100644
--- a/modules/visual_script/doc_classes/VisualScriptPreload.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPreload.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPreload" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptPreload" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Creates a new [Resource] or loads one from the filesystem.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
index 88aac85f59..60cc8fdd4f 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPropertyGet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptPropertyGet" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
index ac962a071d..8f29e9d152 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPropertySet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptPropertySet" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
index a3144582cb..f6300e03f0 100644
--- a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
+++ b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptResourcePath" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptResourcePath" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptReturn.xml b/modules/visual_script/doc_classes/VisualScriptReturn.xml
index ca50f811c3..6095520eff 100644
--- a/modules/visual_script/doc_classes/VisualScriptReturn.xml
+++ b/modules/visual_script/doc_classes/VisualScriptReturn.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptReturn" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptReturn" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Exits a function and returns an optional value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
index 3d4bdcfd0a..7704eaba04 100644
--- a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSceneNode" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptSceneNode" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Node reference.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSceneTree.xml b/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
index c77b674b64..2c2af9262d 100644
--- a/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSceneTree" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptSceneTree" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSelect.xml b/modules/visual_script/doc_classes/VisualScriptSelect.xml
index f1aad841ca..0731fc77e1 100644
--- a/modules/visual_script/doc_classes/VisualScriptSelect.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSelect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSelect" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptSelect" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Chooses between two input values.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSelf.xml b/modules/visual_script/doc_classes/VisualScriptSelf.xml
index c2847fcada..61a73e104c 100644
--- a/modules/visual_script/doc_classes/VisualScriptSelf.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSelf.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSelf" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptSelf" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Outputs a reference to the current instance.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSequence.xml b/modules/visual_script/doc_classes/VisualScriptSequence.xml
index 0180f34c72..c71e068045 100644
--- a/modules/visual_script/doc_classes/VisualScriptSequence.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSequence.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSequence" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptSequence" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Executes a series of Sequence ports.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSubCall.xml b/modules/visual_script/doc_classes/VisualScriptSubCall.xml
index d34d0b7127..46aeebab9c 100644
--- a/modules/visual_script/doc_classes/VisualScriptSubCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSubCall.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSubCall" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptSubCall" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSwitch.xml b/modules/visual_script/doc_classes/VisualScriptSwitch.xml
index ea9e6438cf..a00811a29b 100644
--- a/modules/visual_script/doc_classes/VisualScriptSwitch.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSwitch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSwitch" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptSwitch" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Branches program flow based on a given input's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
index 4bdfeab35b..0bdc4ce89d 100644
--- a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
+++ b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptTypeCast" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptTypeCast" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
index 76c218294e..06178a399d 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptVariableGet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptVariableGet" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Gets a variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
index 0262ad5dfb..5969f25060 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptVariableSet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptVariableSet" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Changes a variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptWhile.xml b/modules/visual_script/doc_classes/VisualScriptWhile.xml
index 46a6ea7a30..b9e7f6a553 100644
--- a/modules/visual_script/doc_classes/VisualScriptWhile.xml
+++ b/modules/visual_script/doc_classes/VisualScriptWhile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptWhile" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptWhile" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
Conditional loop.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptYield.xml b/modules/visual_script/doc_classes/VisualScriptYield.xml
index a1129ffbd7..c4698f746a 100644
--- a/modules/visual_script/doc_classes/VisualScriptYield.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYield.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptYield" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptYield" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
index ad3a016c0d..b67e4ab1b8 100644
--- a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptYieldSignal" inherits="VisualScriptNode" category="Core" version="3.1-dev">
+<class name="VisualScriptYieldSignal" inherits="VisualScriptNode" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/webm/doc_classes/ResourceImporterWebm.xml b/modules/webm/doc_classes/ResourceImporterWebm.xml
index 7c8e1a46b1..0cfab1baf0 100644
--- a/modules/webm/doc_classes/ResourceImporterWebm.xml
+++ b/modules/webm/doc_classes/ResourceImporterWebm.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporterWebm" inherits="ResourceImporter" category="Core" version="3.1-dev">
+<class name="ResourceImporterWebm" inherits="ResourceImporter" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/webm/doc_classes/VideoStreamWebm.xml b/modules/webm/doc_classes/VideoStreamWebm.xml
index d52e2324a1..c02a7a8016 100644
--- a/modules/webm/doc_classes/VideoStreamWebm.xml
+++ b/modules/webm/doc_classes/VideoStreamWebm.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStreamWebm" inherits="VideoStream" category="Core" version="3.1-dev">
+<class name="VideoStreamWebm" inherits="VideoStream" category="Core" version="3.1">
<brief_description>
</brief_description>
<description>
diff --git a/modules/websocket/SCsub b/modules/websocket/SCsub
index 1a36e05863..b36f1beacd 100644
--- a/modules/websocket/SCsub
+++ b/modules/websocket/SCsub
@@ -35,7 +35,6 @@ thirdparty_sources = [
"handshake.c",
"header.c",
"libwebsockets.c",
- "minilex.c",
"output.c",
"pollfd.c",
"service.c",
@@ -69,11 +68,11 @@ else:
env_lws.Append(CPPPATH=[thirdparty_dir])
wrapper_includes = ["#thirdparty/lws/mbedtls_wrapper/include/" + inc for inc in ["internal", "openssl", "platform", ""]]
- env_lws.Append(CPPPATH=wrapper_includes)
+ env_lws.Prepend(CPPPATH=wrapper_includes)
if env['builtin_mbedtls']:
mbedtls_includes = "#thirdparty/mbedtls/include"
- env_lws.Append(CPPPATH=[mbedtls_includes])
+ env_lws.Prepend(CPPPATH=[mbedtls_includes])
if env_lws["platform"] == "windows" or env_lws["platform"] == "uwp":
env_lws.Append(CPPPATH=[thirdparty_dir + helper_dir])
diff --git a/platform/android/AndroidManifest.xml.template b/platform/android/AndroidManifest.xml.template
index 9d8eb951c4..a42ceb3c21 100644
--- a/platform/android/AndroidManifest.xml.template
+++ b/platform/android/AndroidManifest.xml.template
@@ -31,7 +31,7 @@
$$ADD_APPLICATION_CHUNKS$$
</application>
- <uses-feature android:glEsVersion="0x00030000"/>
+ <uses-feature android:glEsVersion="0x00030000" android:required="true" />
$$ADD_PERMISSION_CHUNKS$$
<uses-permission android:name="godot.ACCESS_CHECKIN_PROPERTIES"/>
diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp
index bc77a4e729..e6bd3ff253 100644
--- a/platform/android/audio_driver_opensl.cpp
+++ b/platform/android/audio_driver_opensl.cpp
@@ -271,4 +271,5 @@ AudioDriverOpenSL::AudioDriverOpenSL() {
s_ad = this;
mutex = Mutex::create(); //NULL;
pause = false;
+ active = false;
}
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index 6a9fd6b134..e51a8082f7 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -59,7 +59,7 @@ def configure(env):
# Mac OS X no longer runs on 32-bit since 10.7 which is unsupported since 2014
# As such, we only support 64-bit
- env["bits"] = 64
+ env["bits"] = "64"
## Compiler configuration
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index aa8db8f300..04463a81f0 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -50,6 +50,11 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
+enum VideoDriver {
+ VIDEO_DRIVER_GLES3,
+ VIDEO_DRIVER_GLES2
+};
+
class OS_OSX : public OS_Unix {
public:
struct KeyEvent {
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 6e42eb58bd..f530da8b71 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -31,6 +31,7 @@
#include "os_osx.h"
#include "dir_access_osx.h"
+#include "drivers/gles2/rasterizer_gles2.h"
#include "drivers/gles3/rasterizer_gles3.h"
#include "main/main.h"
#include "os/keyboard.h"
@@ -149,10 +150,44 @@ static Vector2 get_mouse_pos(NSEvent *event) {
@end
@interface GodotApplicationDelegate : NSObject
+- (void)forceUnbundledWindowActivationHackStep1;
+- (void)forceUnbundledWindowActivationHackStep2;
+- (void)forceUnbundledWindowActivationHackStep3;
@end
@implementation GodotApplicationDelegate
+- (void)forceUnbundledWindowActivationHackStep1 {
+ // Step1: Switch focus to macOS Dock.
+ // Required to perform step 2, TransformProcessType will fail if app is already the in focus.
+ for (NSRunningApplication *app in [NSRunningApplication runningApplicationsWithBundleIdentifier:@"com.apple.dock"]) {
+ [app activateWithOptions:NSApplicationActivateIgnoringOtherApps];
+ break;
+ }
+ [self performSelector:@selector(forceUnbundledWindowActivationHackStep2) withObject:nil afterDelay:0.02];
+}
+
+- (void)forceUnbundledWindowActivationHackStep2 {
+ // Step 2: Register app as foreground process.
+ ProcessSerialNumber psn = { 0, kCurrentProcess };
+ (void)TransformProcessType(&psn, kProcessTransformToForegroundApplication);
+
+ [self performSelector:@selector(forceUnbundledWindowActivationHackStep3) withObject:nil afterDelay:0.02];
+}
+
+- (void)forceUnbundledWindowActivationHackStep3 {
+ // Step 3: Switch focus back to app window.
+ [[NSRunningApplication currentApplication] activateWithOptions:NSApplicationActivateIgnoringOtherApps];
+}
+
+- (void)applicationDidFinishLaunching:(NSNotification *)notice {
+ NSString *nsappname = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
+ if (nsappname == nil) {
+ // If executable is not a bundled, macOS WindowServer won't register and activate app window correctly (menu and title bar are grayed out and input ignored).
+ [self performSelector:@selector(forceUnbundledWindowActivationHackStep1) withObject:nil afterDelay:0.02];
+ }
+}
+
- (BOOL)application:(NSApplication *)sender openFile:(NSString *)filename {
// Note: called before main loop init!
char *utfs = strdup([filename UTF8String]);
@@ -992,12 +1027,19 @@ void OS_OSX::set_ime_position(const Point2 &p_pos) {
}
int OS_OSX::get_video_driver_count() const {
- return 1;
+
+ return 2;
}
const char *OS_OSX::get_video_driver_name(int p_driver) const {
- return "GLES3";
+ switch (p_driver) {
+ case VIDEO_DRIVER_GLES2:
+ return "GLES2";
+ case VIDEO_DRIVER_GLES3:
+ default:
+ return "GLES3";
+ }
}
void OS_OSX::initialize_core() {
@@ -1111,8 +1153,12 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
ADD_ATTR(NSOpenGLPFADoubleBuffer);
ADD_ATTR(NSOpenGLPFAClosestPolicy);
- //we now need OpenGL 3 or better, maybe even change this to 3_3Core ?
- ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core);
+ if (p_video_driver == VIDEO_DRIVER_GLES2) {
+ ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersionLegacy);
+ } else {
+ //we now need OpenGL 3 or better, maybe even change this to 3_3Core ?
+ ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core);
+ }
ADD_ATTR2(NSOpenGLPFAColorSize, colorBits);
@@ -1169,13 +1215,16 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
/*** END OSX INITIALIZATION ***/
- bool use_gl2 = p_video_driver != 1;
-
AudioDriverManager::add_driver(&audio_driver);
// only opengl support here...
- RasterizerGLES3::register_config();
- RasterizerGLES3::make_current();
+ if (p_video_driver == VIDEO_DRIVER_GLES2) {
+ RasterizerGLES2::register_config();
+ RasterizerGLES2::make_current();
+ } else {
+ RasterizerGLES3::register_config();
+ RasterizerGLES3::make_current();
+ }
visual_server = memnew(VisualServerRaster);
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
@@ -2325,7 +2374,7 @@ OS_OSX::OS_OSX() {
NSMenuItem *menu_item;
NSString *title;
- NSString *nsappname = [[[NSBundle mainBundle] performSelector:@selector(localizedInfoDictionary)] objectForKey:@"CFBundleName"];
+ NSString *nsappname = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
if (nsappname == nil)
nsappname = [[NSProcessInfo processInfo] processName];
diff --git a/platform/osx/platform_config.h b/platform/osx/platform_config.h
index 1b497cebef..3f72831d77 100644
--- a/platform/osx/platform_config.h
+++ b/platform/osx/platform_config.h
@@ -31,4 +31,5 @@
#include <alloca.h>
#define GLES3_INCLUDE_H "glad/glad.h"
+#define GLES2_INCLUDE_H "glad/glad.h"
#define PTHREAD_RENAME_SELF
diff --git a/platform/server/detect.py b/platform/server/detect.py
index 43aad4ad26..c9a886ad6c 100644
--- a/platform/server/detect.py
+++ b/platform/server/detect.py
@@ -1,4 +1,5 @@
import os
+import platform
import sys
@@ -132,7 +133,12 @@ def configure(env):
env.Append(CPPPATH=['#platform/server'])
env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED'])
env.Append(LIBS=['pthread'])
- env.Append(LIBS=['dl'])
+
+ if (platform.system() == "Linux"):
+ env.Append(LIBS=['dl'])
+
+ if (platform.system().find("BSD") >= 0):
+ env.Append(LIBS=['execinfo'])
# Link those statically for portability
if env['use_static_cpp']:
diff --git a/platform/server/platform_config.h b/platform/server/platform_config.h
index af4cf07393..2fa8eda337 100644
--- a/platform/server/platform_config.h
+++ b/platform/server/platform_config.h
@@ -28,4 +28,10 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#ifdef __linux__
#include <alloca.h>
+#endif
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#include <stdlib.h>
+#define PTHREAD_BSD_SET_NAME
+#endif
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 20129299a1..8df4306729 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -632,7 +632,16 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
video_mode.width = window_w;
video_mode.height = window_h;
}
- //return 0; // Jump Back
+ if (wParam == SIZE_MAXIMIZED) {
+ maximized = true;
+ minimized = false;
+ } else if (wParam == SIZE_MINIMIZED) {
+ maximized = false;
+ minimized = true;
+ } else if (wParam == SIZE_RESTORED) {
+ maximized = false;
+ minimized = false;
+ }
} break;
case WM_ENTERSIZEMOVE: {
diff --git a/platform/windows/platform_config.h b/platform/windows/platform_config.h
index 10ec9110d1..d100385e80 100644
--- a/platform/windows/platform_config.h
+++ b/platform/windows/platform_config.h
@@ -33,3 +33,4 @@
//#include <alloca.h>
//#endif
#define GLES3_INCLUDE_H "glad/glad.h"
+#define GLES2_INCLUDE_H "glad/glad.h"
diff --git a/platform/x11/context_gl_x11.cpp b/platform/x11/context_gl_x11.cpp
index 20f2212861..7a659a2734 100644
--- a/platform/x11/context_gl_x11.cpp
+++ b/platform/x11/context_gl_x11.cpp
@@ -146,20 +146,38 @@ Error ContextGL_X11::initialize() {
int (*oldHandler)(Display *, XErrorEvent *) =
XSetErrorHandler(&ctxErrorHandler);
- if (!opengl_3_context) {
- //oldstyle context:
- p->glx_context = glXCreateContext(x11_display, vi, 0, GL_TRUE);
- } else {
- static int context_attribs[] = {
- GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
- GLX_CONTEXT_MINOR_VERSION_ARB, 3,
- GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB /*|GLX_CONTEXT_DEBUG_BIT_ARB*/,
- None
- };
-
- p->glx_context = glXCreateContextAttribsARB(x11_display, fbc[0], NULL, true, context_attribs);
- ERR_EXPLAIN("Could not obtain an OpenGL 3.3 context!");
- ERR_FAIL_COND_V(ctxErrorOccurred || !p->glx_context, ERR_UNCONFIGURED);
+ switch (context_type) {
+ case GLES_2_0_COMPATIBLE:
+ case OLDSTYLE: {
+ p->glx_context = glXCreateContext(x11_display, vi, 0, GL_TRUE);
+ } break;
+ /*
+ case ContextType::GLES_2_0_COMPATIBLE: {
+
+ static int context_attribs[] = {
+ GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
+ GLX_CONTEXT_MINOR_VERSION_ARB, 0,
+ None
+ };
+
+ p->glx_context = glXCreateContextAttribsARB(x11_display, fbc[0], NULL, true, context_attribs);
+ ERR_EXPLAIN("Could not obtain an OpenGL 3.0 context!");
+ ERR_FAIL_COND_V(!p->glx_context, ERR_UNCONFIGURED);
+ } break;
+ */
+ case GLES_3_0_COMPATIBLE: {
+
+ static int context_attribs[] = {
+ GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
+ GLX_CONTEXT_MINOR_VERSION_ARB, 3,
+ GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB /*|GLX_CONTEXT_DEBUG_BIT_ARB*/,
+ None
+ };
+
+ p->glx_context = glXCreateContextAttribsARB(x11_display, fbc[0], NULL, true, context_attribs);
+ ERR_EXPLAIN("Could not obtain an OpenGL 3.3 context!");
+ ERR_FAIL_COND_V(ctxErrorOccurred || !p->glx_context, ERR_UNCONFIGURED);
+ } break;
}
XSync(x11_display, False);
@@ -229,13 +247,13 @@ bool ContextGL_X11::is_using_vsync() const {
return use_vsync;
}
-ContextGL_X11::ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, bool p_opengl_3_context) :
+ContextGL_X11::ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, ContextType p_context_type) :
x11_window(p_x11_window) {
default_video_mode = p_default_video_mode;
x11_display = p_x11_display;
- opengl_3_context = p_opengl_3_context;
+ context_type = p_context_type;
double_buffer = false;
direct_render = false;
diff --git a/platform/x11/context_gl_x11.h b/platform/x11/context_gl_x11.h
index c969f0044d..b54cc84fac 100644
--- a/platform/x11/context_gl_x11.h
+++ b/platform/x11/context_gl_x11.h
@@ -46,6 +46,14 @@ struct ContextGL_X11_Private;
class ContextGL_X11 : public ContextGL {
+public:
+ enum ContextType {
+ OLDSTYLE,
+ GLES_2_0_COMPATIBLE,
+ GLES_3_0_COMPATIBLE
+ };
+
+private:
ContextGL_X11_Private *p;
OS::VideoMode default_video_mode;
//::Colormap x11_colormap;
@@ -54,8 +62,8 @@ class ContextGL_X11 : public ContextGL {
bool double_buffer;
bool direct_render;
int glx_minor, glx_major;
- bool opengl_3_context;
bool use_vsync;
+ ContextType context_type;
public:
virtual void release_current();
@@ -69,7 +77,7 @@ public:
virtual void set_use_vsync(bool p_use);
virtual bool is_using_vsync() const;
- ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, bool p_opengl_3_context);
+ ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, ContextType p_context_type);
~ContextGL_X11();
};
diff --git a/platform/x11/crash_handler_x11.cpp b/platform/x11/crash_handler_x11.cpp
index 43b9051ea7..d39fc33f81 100644
--- a/platform/x11/crash_handler_x11.cpp
+++ b/platform/x11/crash_handler_x11.cpp
@@ -32,8 +32,9 @@
#define CRASH_HANDLER_ENABLED 1
#endif
+#include "crash_handler_x11.h"
#include "main/main.h"
-#include "os_x11.h"
+#include "os/os.h"
#include "project_settings.h"
#ifdef CRASH_HANDLER_ENABLED
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 66c02561b5..0cdd0f338b 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "os_x11.h"
+#include "drivers/gles2/rasterizer_gles2.h"
#include "drivers/gles3/rasterizer_gles3.h"
#include "errno.h"
#include "key_mapping_x11.h"
@@ -77,14 +78,23 @@
#include <X11/XKBlib.h>
int OS_X11::get_video_driver_count() const {
- return 1;
+
+ return 2;
}
const char *OS_X11::get_video_driver_name(int p_driver) const {
- return "GLES3";
+
+ switch (p_driver) {
+ case VIDEO_DRIVER_GLES2:
+ return "GLES2";
+ case VIDEO_DRIVER_GLES3:
+ default:
+ return "GLES3";
+ }
}
int OS_X11::get_audio_driver_count() const {
+
return AudioDriverManager::get_driver_count();
}
@@ -283,12 +293,25 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
//print_line("def videomode "+itos(current_videomode.width)+","+itos(current_videomode.height));
#if defined(OPENGL_ENABLED)
- context_gl = memnew(ContextGL_X11(x11_display, x11_window, current_videomode, true));
- context_gl->initialize();
+ ContextGL_X11::ContextType opengl_api_type = ContextGL_X11::GLES_3_0_COMPATIBLE;
+
+ if (p_video_driver == VIDEO_DRIVER_GLES2) {
+ opengl_api_type = ContextGL_X11::GLES_2_0_COMPATIBLE;
+ }
- RasterizerGLES3::register_config();
+ context_gl = memnew(ContextGL_X11(x11_display, x11_window, current_videomode, opengl_api_type));
+ context_gl->initialize();
- RasterizerGLES3::make_current();
+ switch (opengl_api_type) {
+ case ContextGL_X11::GLES_2_0_COMPATIBLE: {
+ RasterizerGLES2::register_config();
+ RasterizerGLES2::make_current();
+ } break;
+ case ContextGL_X11::GLES_3_0_COMPATIBLE: {
+ RasterizerGLES3::register_config();
+ RasterizerGLES3::make_current();
+ } break;
+ }
context_gl->set_use_vsync(current_videomode.use_vsync);
@@ -1193,6 +1216,7 @@ bool OS_X11::is_window_maximized() const {
unsigned long len;
unsigned long remaining;
unsigned char *data = NULL;
+ bool retval = false;
int result = XGetWindowProperty(
x11_display,
@@ -1221,13 +1245,15 @@ bool OS_X11::is_window_maximized() const {
if (atoms[i] == wm_max_vert)
found_wm_max_vert = true;
- if (found_wm_max_horz && found_wm_max_vert)
- return true;
+ if (found_wm_max_horz && found_wm_max_vert) {
+ retval = true;
+ break;
+ }
}
- XFree(atoms);
}
- return false;
+ XFree(data);
+ return retval;
}
void OS_X11::set_window_always_on_top(bool p_enabled) {
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index 494845bc56..9aa742b0a7 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -53,6 +53,11 @@
#include <X11/extensions/XInput2.h>
#endif
+enum VideoDriver {
+ VIDEO_DRIVER_GLES3,
+ VIDEO_DRIVER_GLES2
+};
+
// Hints for X11 fullscreen
typedef struct {
unsigned long flags;
diff --git a/platform/x11/platform_config.h b/platform/x11/platform_config.h
index 58d6b210ee..b757be49c3 100644
--- a/platform/x11/platform_config.h
+++ b/platform/x11/platform_config.h
@@ -37,3 +37,4 @@
#endif
#define GLES3_INCLUDE_H "glad/glad.h"
+#define GLES2_INCLUDE_H "glad/glad.h"
diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp
index e7ab6cde8a..77bf703706 100644
--- a/scene/3d/navigation.cpp
+++ b/scene/3d/navigation.cpp
@@ -35,6 +35,7 @@ void Navigation::_navmesh_link(int p_id) {
ERR_FAIL_COND(!navmesh_map.has(p_id));
NavMesh &nm = navmesh_map[p_id];
ERR_FAIL_COND(nm.linked);
+ ERR_FAIL_COND(nm.navmesh.is_null());
PoolVector<Vector3> vertices = nm.navmesh->get_vertices();
int len = vertices.size();
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp
index 3985039716..9fc8e98a7f 100644
--- a/scene/gui/gradient_edit.cpp
+++ b/scene/gui/gradient_edit.cpp
@@ -367,6 +367,13 @@ void GradientEdit::_notification(int p_what) {
draw_line(Vector2(-1, -1), Vector2(-1, h + 1), Color(1, 1, 1, 0.6));
}
}
+
+ if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
+
+ if (!is_visible()) {
+ grabbing = false;
+ }
+ }
}
void GradientEdit::_draw_checker(int x, int y, int w, int h) {
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 381c6c75a5..5bc5d8e690 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -247,6 +247,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
int rchar = 0;
int lh = 0;
bool line_is_blank = true;
+ int fh = 0;
while (it) {
@@ -262,14 +263,9 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
const CharType *c = text->text.c_str();
const CharType *cf = c;
- int fh = font->get_height();
int ascent = font->get_ascent();
int descent = font->get_descent();
- line_ascent = MAX(line_ascent, ascent);
- line_descent = MAX(line_descent, descent);
- fh = MAX(fh, line_ascent + line_descent); // various fonts!
-
Color color;
bool underline = false;
@@ -317,8 +313,13 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
end++;
}
+ CHECK_HEIGHT(fh);
ENSURE_WIDTH(w);
+ line_ascent = MAX(line_ascent, ascent);
+ line_descent = MAX(line_descent, descent);
+ fh = line_ascent + line_descent;
+
if (end && c[end - 1] == ' ') {
if (p_mode == PROCESS_CACHE) {
spaces_size += font->get_char_size(' ').width;
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index f0e89877cd..dee32aef7a 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -882,4 +882,6 @@ Tabs::Tabs() {
min_width = 0;
scrolling_enabled = true;
+ buttons_visible = false;
+ hover = -1;
}
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index cdbdc9b0d7..b8fd2ce16e 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -3911,6 +3911,8 @@ Tree::Tree() {
cache.click_id = -1;
cache.click_item = NULL;
cache.click_column = 0;
+ cache.hover_cell = -1;
+ cache.hover_index = -1;
last_keypress = 0;
focus_in_id = 0;
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 1ff1f4b6d8..4f702e8ed9 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -192,6 +192,7 @@ Viewport::GUI::GUI() {
}
/////////////////////////////////////
+
void Viewport::_update_stretch_transform() {
if (size_override_stretch && size_override) {
@@ -318,6 +319,11 @@ void Viewport::_notification(int p_what) {
first->make_current();
}
#endif
+
+ // Enable processing for tooltips, collision debugging, physics object picking, etc.
+ set_process_internal(true);
+ set_physics_process_internal(true);
+
} break;
case NOTIFICATION_EXIT_TREE: {
@@ -345,15 +351,18 @@ void Viewport::_notification(int p_what) {
VS::get_singleton()->viewport_set_active(viewport, false);
} break;
- case NOTIFICATION_PHYSICS_PROCESS: {
+ case NOTIFICATION_INTERNAL_PROCESS: {
if (gui.tooltip_timer >= 0) {
- gui.tooltip_timer -= get_physics_process_delta_time();
+ gui.tooltip_timer -= get_process_delta_time();
if (gui.tooltip_timer < 0) {
_gui_show_tooltip();
}
}
+ } break;
+ case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
+
if (get_tree()->is_debugging_collisions_hint() && contact_2d_debug.is_valid()) {
VisualServer::get_singleton()->canvas_item_clear(contact_2d_debug);
@@ -2404,9 +2413,14 @@ Rect2 Viewport::get_attach_to_screen_rect() const {
void Viewport::set_physics_object_picking(bool p_enable) {
physics_object_picking = p_enable;
- set_physics_process(physics_object_picking);
- if (!physics_object_picking)
+ if (!physics_object_picking) {
physics_picking_events.clear();
+ }
+}
+
+bool Viewport::get_physics_object_picking() {
+
+ return physics_object_picking;
}
Vector2 Viewport::get_camera_coords(const Vector2 &p_viewport_coords) const {
@@ -2420,11 +2434,6 @@ Vector2 Viewport::get_camera_rect_size() const {
return size;
}
-bool Viewport::get_physics_object_picking() {
-
- return physics_object_picking;
-}
-
bool Viewport::gui_has_modal_stack() const {
return gui.modal_stack.size();
@@ -2789,6 +2798,7 @@ Viewport::Viewport() {
gui.drag_preview = NULL;
gui.drag_attempted = false;
gui.canvas_sort_index = 0;
+ gui.roots_order_dirty = false;
msaa = MSAA_DISABLED;
hdr = true;
diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp
index bb5295709a..030b822f3b 100644
--- a/scene/resources/scene_format_text.cpp
+++ b/scene/resources/scene_format_text.cpp
@@ -1445,8 +1445,15 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant,
static String _valprop(const String &p_name) {
- if (p_name.find("\"") != -1 || p_name.find("=") != -1 || p_name.find(" ") != -1)
- return "\"" + p_name.c_escape_multiline() + "\"";
+ // Escape and quote strings with extended ASCII or further Unicode characters
+ // as well as '"', '=' or ' ' (32)
+ const CharType *cstr = p_name.c_str();
+ for (int i = 0; cstr[i]; i++) {
+ if (cstr[i] == '=' || cstr[i] == '"' || cstr[i] < 33 || cstr[i] > 126) {
+ return "\"" + p_name.c_escape_multiline() + "\"";
+ }
+ }
+ // Keep as is
return p_name;
}
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index db5e14043c..f01a4c2f64 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -96,7 +96,7 @@ void PhysicsDirectBodyState::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_force", "force", "position"), &PhysicsDirectBodyState::add_force);
ClassDB::bind_method(D_METHOD("add_torque", "torque"), &PhysicsDirectBodyState::add_torque);
ClassDB::bind_method(D_METHOD("apply_impulse", "position", "j"), &PhysicsDirectBodyState::apply_impulse);
- ClassDB::bind_method(D_METHOD("apply_torqe_impulse", "j"), &PhysicsDirectBodyState::apply_torque_impulse);
+ ClassDB::bind_method(D_METHOD("apply_torque_impulse", "j"), &PhysicsDirectBodyState::apply_torque_impulse);
ClassDB::bind_method(D_METHOD("set_sleep_state", "enabled"), &PhysicsDirectBodyState::set_sleep_state);
ClassDB::bind_method(D_METHOD("is_sleeping"), &PhysicsDirectBodyState::is_sleeping);
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index d9f2c949e9..1f66b0ba9d 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -1641,10 +1641,10 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = {
{ "floatBitsToInt", TYPE_IVEC3, { TYPE_VEC3, TYPE_VOID } },
{ "floatBitsToInt", TYPE_IVEC4, { TYPE_VEC4, TYPE_VOID } },
- { "floatBitsToUInt", TYPE_UINT, { TYPE_FLOAT, TYPE_VOID } },
- { "floatBitsToUInt", TYPE_UVEC2, { TYPE_VEC2, TYPE_VOID } },
- { "floatBitsToUInt", TYPE_UVEC3, { TYPE_VEC3, TYPE_VOID } },
- { "floatBitsToUInt", TYPE_UVEC4, { TYPE_VEC4, TYPE_VOID } },
+ { "floatBitsToUint", TYPE_UINT, { TYPE_FLOAT, TYPE_VOID } },
+ { "floatBitsToUint", TYPE_UVEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "floatBitsToUint", TYPE_UVEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "floatBitsToUint", TYPE_UVEC4, { TYPE_VEC4, TYPE_VOID } },
{ "intBitsToFloat", TYPE_FLOAT, { TYPE_INT, TYPE_VOID } },
{ "intBitsToFloat", TYPE_VEC2, { TYPE_IVEC2, TYPE_VOID } },
diff --git a/thirdparty/README.md b/thirdparty/README.md
index b704764038..d3fa0e4664 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -238,13 +238,13 @@ changes are marked with `// -- GODOT --` comments.
- License: LGPLv2.1 + static linking exception
File extracted from upstream source:
-- Everything in `lib/` except `http2/`, `event-libs/`.
+- Everything in `lib/` except `minilex.c`, `http2/`, `event-libs/`.
- From `misc/` exclude `lws-genhash.c`, `lws-ring.c`, `romfs.{c,h}`, `smtp.c`.
- From `plat/` exclude `lws-plat-{esp*,optee}.c`.
- From `server/` exclude `access-log.c`, `cgi.c`, `daemonize.c`, `lws-spa.c`,
`peer-limits.c`, `rewrite.c`
- Also copy `win32helpers/` from `win32port/`
-- `mbedtls_wrapper/include/platform/ssl_port.h` has a small change to check for OSX (missing `malloc.h`).
+- `mbedtls_wrapper/include/platform/ssl_port.h` has a small change to check for OSX and FreeBSD (missing `malloc.h`).
The bug is fixed in upstream master via `LWS_HAVE_MALLOC_H`, but not in the 2.4.1 branch (as the file structure has changed).
Important: `lws_config.h` and `lws_config_private.h` contains custom
diff --git a/thirdparty/glad/glad.c b/thirdparty/glad/glad.c
index f87ec8cf93..ee66d50ff1 100644
--- a/thirdparty/glad/glad.c
+++ b/thirdparty/glad/glad.c
@@ -1,21 +1,22 @@
/*
- OpenGL loader generated by glad 0.1.16a0 on Thu Nov 30 06:21:28 2017.
+ OpenGL loader generated by glad 0.1.18a0 on Fri Mar 2 11:26:24 2018.
Language/Generator: C/C++
Specification: gl
APIs: gl=3.3
Profile: compatibility
Extensions:
- GL_ARB_debug_output
+ GL_ARB_debug_output,
+ GL_ARB_framebuffer_object
Loader: True
Local files: False
Omit khrplatform: False
Commandline:
- --profile="compatibility" --api="gl=3.3" --generator="c" --spec="gl" --extensions="GL_ARB_debug_output"
+ --profile="compatibility" --api="gl=3.3" --generator="c" --spec="gl" --extensions="GL_ARB_debug_output,GL_ARB_framebuffer_object"
Online:
- http://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D3.3&extensions=GL_ARB_debug_output
+ http://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D3.3&extensions=GL_ARB_debug_output&extensions=GL_ARB_framebuffer_object
*/
#include <stdio.h>
@@ -47,8 +48,8 @@ int open_gl(void) {
static
void close_gl(void) {
if(libGL != NULL) {
- FreeLibrary(libGL);
- libGL = NULL;
+ FreeLibrary((HMODULE) libGL);
+ libGL = NULL;
}
}
#else
@@ -112,7 +113,7 @@ void* get_proc(const char *namez) {
#endif
if(result == NULL) {
#ifdef _WIN32
- result = (void*)GetProcAddress(libGL, namez);
+ result = (void*)GetProcAddress((HMODULE) libGL, namez);
#else
result = dlsym(libGL, namez);
#endif
@@ -168,7 +169,7 @@ static int get_exts(void) {
const char *gl_str_tmp = (const char*)glGetStringi(GL_EXTENSIONS, index);
size_t len = strlen(gl_str_tmp);
- char *local_str = (char*)malloc((len+1) * sizeof(*exts_i));
+ char *local_str = (char*)malloc((len+1) * sizeof(char));
if(local_str != NULL) {
#if _MSC_VER >= 1400
strncpy_s(local_str, len+1, gl_str_tmp, len);
@@ -971,6 +972,7 @@ PFNGLCOLORPOINTERPROC glad_glColorPointer;
PFNGLFRONTFACEPROC glad_glFrontFace;
PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v;
PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv;
+int GLAD_GL_ARB_framebuffer_object;
int GLAD_GL_ARB_debug_output;
PFNGLDEBUGMESSAGECONTROLARBPROC glad_glDebugMessageControlARB;
PFNGLDEBUGMESSAGEINSERTARBPROC glad_glDebugMessageInsertARB;
@@ -1746,9 +1748,33 @@ static void load_GL_ARB_debug_output(GLADloadproc load) {
glad_glDebugMessageCallbackARB = (PFNGLDEBUGMESSAGECALLBACKARBPROC)load("glDebugMessageCallbackARB");
glad_glGetDebugMessageLogARB = (PFNGLGETDEBUGMESSAGELOGARBPROC)load("glGetDebugMessageLogARB");
}
+static void load_GL_ARB_framebuffer_object(GLADloadproc load) {
+ if(!GLAD_GL_ARB_framebuffer_object) return;
+ glad_glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC)load("glIsRenderbuffer");
+ glad_glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC)load("glBindRenderbuffer");
+ glad_glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC)load("glDeleteRenderbuffers");
+ glad_glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC)load("glGenRenderbuffers");
+ glad_glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC)load("glRenderbufferStorage");
+ glad_glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC)load("glGetRenderbufferParameteriv");
+ glad_glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC)load("glIsFramebuffer");
+ glad_glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)load("glBindFramebuffer");
+ glad_glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)load("glDeleteFramebuffers");
+ glad_glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)load("glGenFramebuffers");
+ glad_glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)load("glCheckFramebufferStatus");
+ glad_glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC)load("glFramebufferTexture1D");
+ glad_glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)load("glFramebufferTexture2D");
+ glad_glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC)load("glFramebufferTexture3D");
+ glad_glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC)load("glFramebufferRenderbuffer");
+ glad_glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)load("glGetFramebufferAttachmentParameteriv");
+ glad_glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC)load("glGenerateMipmap");
+ glad_glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC)load("glBlitFramebuffer");
+ glad_glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)load("glRenderbufferStorageMultisample");
+ glad_glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC)load("glFramebufferTextureLayer");
+}
static int find_extensionsGL(void) {
if (!get_exts()) return 0;
GLAD_GL_ARB_debug_output = has_ext("GL_ARB_debug_output");
+ GLAD_GL_ARB_framebuffer_object = has_ext("GL_ARB_framebuffer_object");
free_exts();
return 1;
}
@@ -1828,6 +1854,7 @@ int gladLoadGLLoader(GLADloadproc load) {
if (!find_extensionsGL()) return 0;
load_GL_ARB_debug_output(load);
+ load_GL_ARB_framebuffer_object(load);
return GLVersion.major != 0 || GLVersion.minor != 0;
}
diff --git a/thirdparty/glad/glad/glad.h b/thirdparty/glad/glad/glad.h
index 69413ef65f..9f54dbc8dc 100644
--- a/thirdparty/glad/glad/glad.h
+++ b/thirdparty/glad/glad/glad.h
@@ -1,21 +1,22 @@
/*
- OpenGL loader generated by glad 0.1.16a0 on Thu Nov 30 06:21:28 2017.
+ OpenGL loader generated by glad 0.1.18a0 on Fri Mar 2 11:26:24 2018.
Language/Generator: C/C++
Specification: gl
APIs: gl=3.3
Profile: compatibility
Extensions:
- GL_ARB_debug_output
+ GL_ARB_debug_output,
+ GL_ARB_framebuffer_object
Loader: True
Local files: False
Omit khrplatform: False
Commandline:
- --profile="compatibility" --api="gl=3.3" --generator="c" --spec="gl" --extensions="GL_ARB_debug_output"
+ --profile="compatibility" --api="gl=3.3" --generator="c" --spec="gl" --extensions="GL_ARB_debug_output,GL_ARB_framebuffer_object"
Online:
- http://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D3.3&extensions=GL_ARB_debug_output
+ http://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D3.3&extensions=GL_ARB_debug_output&extensions=GL_ARB_framebuffer_object
*/
@@ -3696,6 +3697,10 @@ typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC)(GLuint count, GLsizei
GLAPI PFNGLGETDEBUGMESSAGELOGARBPROC glad_glGetDebugMessageLogARB;
#define glGetDebugMessageLogARB glad_glGetDebugMessageLogARB
#endif
+#ifndef GL_ARB_framebuffer_object
+#define GL_ARB_framebuffer_object 1
+GLAPI int GLAD_GL_ARB_framebuffer_object;
+#endif
#ifdef __cplusplus
}
diff --git a/thirdparty/lws/mbedtls_wrapper/include/platform/ssl_port.h b/thirdparty/lws/mbedtls_wrapper/include/platform/ssl_port.h
index fd461e9819..2ffd7e7544 100644
--- a/thirdparty/lws/mbedtls_wrapper/include/platform/ssl_port.h
+++ b/thirdparty/lws/mbedtls_wrapper/include/platform/ssl_port.h
@@ -25,7 +25,7 @@
*/
#include "string.h"
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__)
#include <stdlib.h>
#else
#include "malloc.h"
diff --git a/thirdparty/lws/minilex.c b/thirdparty/lws/minilex.c
deleted file mode 100644
index 3cb1e33696..0000000000
--- a/thirdparty/lws/minilex.c
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * minilex.c
- *
- * High efficiency lexical state parser
- *
- * Copyright (C)2011-2014 Andy Green <andy@warmcat.com>
- *
- * Licensed under LGPL2
- *
- * Usage: gcc minilex.c -o minilex && ./minilex > lextable.h
- *
- * Run it twice to test parsing on the generated table on stderr
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "lextable-strings.h"
-
-/*
- * b7 = 0 = 1-byte seq
- * 0x08 = fail
- * 2-byte seq
- * 0x00 - 0x07, then terminal as given in 2nd byte
- 3-byte seq
- * no match: go fwd 3 byte, match: jump fwd by amt in +1/+2 bytes
- * = 1 = 1-byte seq
- * no match: die, match go fwd 1 byte
- */
-
-unsigned char lextable[] = {
- #include "lextable.h"
-};
-
-#define PARALLEL 30
-
-struct state {
- char c[PARALLEL];
- int state[PARALLEL];
- int count;
- int bytepos;
-
- int real_pos;
-};
-
-struct state state[1000];
-int next = 1;
-
-#define FAIL_CHAR 0x08
-
-int lextable_decode(int pos, char c)
-{
- while (1) {
- if (lextable[pos] & (1 << 7)) { /* 1-byte, fail on mismatch */
- if ((lextable[pos] & 0x7f) != c)
- return -1;
- /* fall thru */
- pos++;
- if (lextable[pos] == FAIL_CHAR)
- return -1;
- return pos;
- } else { /* b7 = 0, end or 3-byte */
- if (lextable[pos] < FAIL_CHAR) /* terminal marker */
- return pos;
-
- if (lextable[pos] == c) /* goto */
- return pos + (lextable[pos + 1]) +
- (lextable[pos + 2] << 8);
- /* fall thru goto */
- pos += 3;
- /* continue */
- }
- }
-}
-
-int main(void)
-{
- int n = 0;
- int m = 0;
- int prev;
- char c;
- int walk;
- int saw;
- int y;
- int j;
- int pos = 0;
-
- while (n < sizeof(set) / sizeof(set[0])) {
-
- m = 0;
- walk = 0;
- prev = 0;
-
- if (set[n][0] == '\0') {
- n++;
- continue;
- }
-
- while (set[n][m]) {
-
- saw = 0;
- for (y = 0; y < state[walk].count; y++)
- if (state[walk].c[y] == set[n][m]) {
- /* exists -- go forward */
- walk = state[walk].state[y];
- saw = 1;
- break;
- }
-
- if (saw)
- goto again;
-
- /* something we didn't see before */
-
- state[walk].c[state[walk].count] = set[n][m];
-
- state[walk].state[state[walk].count] = next;
- state[walk].count++;
- walk = next++;
-again:
- m++;
- }
-
- state[walk].c[0] = n++;
- state[walk].state[0] = 0; /* terminal marker */
- state[walk].count = 1;
- }
-
- walk = 0;
- for (n = 0; n < next; n++) {
- state[n].bytepos = walk;
- walk += (2 * state[n].count);
- }
-
- /* compute everyone's position first */
-
- pos = 0;
- walk = 0;
- for (n = 0; n < next; n++) {
-
- state[n].real_pos = pos;
-
- for (m = 0; m < state[n].count; m++) {
-
- if (state[n].state[m] == 0)
- pos += 2; /* terminal marker */
- else { /* c is a character */
- if ((state[state[n].state[m]].bytepos -
- walk) == 2)
- pos++;
- else {
- pos += 3;
- if (m == state[n].count - 1)
- pos++; /* fail */
- }
- }
- walk += 2;
- }
- }
-
- walk = 0;
- pos = 0;
- for (n = 0; n < next; n++) {
- for (m = 0; m < state[n].count; m++) {
-
- if (!m)
- fprintf(stdout, "/* pos %04x: %3d */ ",
- state[n].real_pos, n);
- else
- fprintf(stdout, " ");
-
- y = state[n].c[m];
- saw = state[n].state[m];
-
- if (saw == 0) { // c is a terminal then
-
- if (y > 0x7ff) {
- fprintf(stderr, "terminal too big\n");
- return 2;
- }
-
- fprintf(stdout, " 0x%02X, 0x%02X "
- " "
- "/* - terminal marker %2d - */,\n",
- y >> 8, y & 0xff, y & 0x7f);
- pos += 2;
- walk += 2;
- continue;
- }
-
- /* c is a character */
-
- prev = y &0x7f;
- if (prev < 32 || prev > 126)
- prev = '.';
-
-
- if ((state[saw].bytepos - walk) == 2) {
- fprintf(stdout, " 0x%02X /* '%c' -> */,\n",
- y | 0x80, prev);
- pos++;
- walk += 2;
- continue;
- }
-
- j = state[saw].real_pos - pos;
-
- if (j > 0xffff) {
- fprintf(stderr,
- "Jump > 64K bytes ahead (%d to %d)\n",
- state[n].real_pos, state[saw].real_pos);
- return 1;
- }
- fprintf(stdout, " 0x%02X /* '%c' */, 0x%02X, 0x%02X "
- "/* (to 0x%04X state %3d) */,\n",
- y, prev,
- j & 0xff, j >> 8,
- state[saw].real_pos, saw);
- pos += 3;
-
- if (m == state[n].count - 1) {
- fprintf(stdout,
- " 0x%02X, /* fail */\n",
- FAIL_CHAR);
- pos++; /* fail */
- }
-
- walk += 2;
- }
- }
-
- fprintf(stdout, "/* total size %d bytes */\n", pos);
-
- /*
- * Try to parse every legal input string
- */
-
- for (n = 0; n < sizeof(set) / sizeof(set[0]); n++) {
- walk = 0;
- m = 0;
- y = -1;
-
- if (set[n][0] == '\0')
- continue;
-
- fprintf(stderr, " trying '%s'\n", set[n]);
-
- while (set[n][m]) {
- walk = lextable_decode(walk, set[n][m]);
- if (walk < 0) {
- fprintf(stderr, "failed\n");
- return 3;
- }
-
- if (lextable[walk] < FAIL_CHAR) {
- y = (lextable[walk] << 8) + lextable[walk + 1];
- break;
- }
- m++;
- }
-
- if (y != n) {
- fprintf(stderr, "decode failed %d\n", y);
- return 4;
- }
- }
-
- fprintf(stderr, "All decode OK\n");
-
- return 0;
-}