summaryrefslogtreecommitdiffstats
path: root/servers
Commit message (Collapse)AuthorAgeFilesLines
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-1473-1034/+1993
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-1480-0/+451
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-14171-4013/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Remove redundant void argument listsRémi Verschelde2020-05-144-12/+12
| | | | | Using clang-tidy's `modernize-redundant-void-arg`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-redundant-void-arg.html
* Enforce use of bool literals instead of integersRémi Verschelde2020-05-145-5/+5
| | | | | Using clang-tidy's `modernize-use-bool-literals`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
* Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde2020-05-141-3/+3
| | | | | Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-1412-169/+101
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Merge pull request #38691 from madmiraal/fix-eq-uninitialised-warningRémi Verschelde2020-05-121-0/+1
|\ | | | | Silence EQ::Band::c1, c2 and c3 may be used uninitialized warnings.
| * Silence EQ::Band::c1, c2 and c3 may be used uninitialized warnings.Marcel Admiraal2020-05-121-0/+1
| |
* | Fixes memory leak with lightmap part 2qarmin2020-05-121-0/+2
| |
* | Fix memory leak with light mapsqarmin2020-05-111-0/+2
|/
* New lightmapperJuan Linietsky2020-05-1037-604/+1512
| | | | | | | -Added LocalVector (needed it) -Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too) -Fixes and changes all around the place -Added library for 128 bits fixed point (required for Delaunay3D)
* Revert "Renamed plane's d to distance"Rémi Verschelde2020-05-103-4/+4
| | | | | | | This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3. This was wrong, `d` is not a distance but the `d` constant in the parametric equation `ax + by + cz = d` describing the plane.
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-1019-416/+1007
| | | | Part of #33027.
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-1013-40/+76
| | | | | | | Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
* Style: Add missing copyright headersRémi Verschelde2020-05-102-0/+60
|
* Renamed plane's d to distanceMarcus Elg2020-05-103-4/+4
|
* Revert "register RenderingDevice as gdscript singleton"Rémi Verschelde2020-05-091-1/+0
| | | | | | | This reverts commit 1058a57666cafadbbeeed5a42a72f0e4f627a389. RenderingDevice is meant to be instantiated in scripts, not a singleton. This actually doesn't work properly right now, but reduz will fix it.
* Turn the anisotropic filtering setting into an enumHugo Locurcio2020-05-082-3/+4
| | | | | | | | Since it only accepts power-of-two values, exposing it as an enum makes more sense. This also allows for adding property hints to indicate the performance cost of each value. This also improves property hints for MSAA and FXAA.
* Merge pull request #38226 from Calinou/increase-camera3d-fovRémi Verschelde2020-05-071-1/+1
|\ | | | | Increase the default Camera3D field of view to 75
| * Increase the default Camera3D field of view to 75Hugo Locurcio2020-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A vertical FOV of 75 degrees is roughly equivalent to a 91 degree horizontal FOV on a 4:3 display (~107.51 degrees on 16:9), which is close to the typical default FOV used in PC games. Note that this doesn't apply to the in-editor camera which keeps its FOV to 70. This is because it doesn't display in fullscreen; its viewport only displays in the center of the editor (roughly). This means the viewport won't cover the viewer's eyes as much. Therefore, the editor camera FOV should be slightly lower to account for this. Since this changes the default value, this may break existing projects slightly. For the record, this was already done in https://github.com/godotengine/godot-demo-projects/pull/260 for the official demo projects.
* | Merge pull request #38406 from clayjohn/VULKAN-sun-diameterRémi Verschelde2020-05-031-9/+13
|\ \ | | | | | | Calculate sun diameter even when not using shadows
| * | Calculate sun diameter even when not using shadowsclayjohn2020-05-011-9/+13
| | |
* | | register RenderingDevice as gdscript singletonPhilip Whitfield2020-05-031-0/+1
|/ /
* | Merge pull request #38337 from RandomShaper/time_rollbackRémi Verschelde2020-04-302-0/+9
|\ \ | | | | | | Improve shader time roll over
| * | Improve shader time roll overPedro J. Estébanez2020-04-302-0/+9
| | | | | | | | | | | | | | | | | | - Resurrect it for GL ES 2 - Add it to the Vulkan rasterizer - Expose the setting from the `RenderingServer`, since it does not belong in any specific rasterizer
* | | Fixed unbounded dual-paraboloid shadow map culling.Kiri Jolly2020-04-291-1/+2
|/ / | | | | | | | | | | Dual paraboloid shadowmaps were ending up with infinitely large volumes of area behind the hemisphere un-culled. This change just adds a back plane to the convex shape used for the culling volume.
* | Merge pull request #20371 from aaronfranke/vector-lerpRémi Verschelde2020-04-291-8/+8
|\ \ | | | | | | [Core] [Mono] [GDNative] Rename "linear_interpolate" methods to "lerp"
| * | [Core] Rename linear_interpolate to lerpAaron Franke2020-04-291-8/+8
| | |
* | | Merge pull request #38302 from qarmin/format_setRémi Verschelde2020-04-291-2/+0
|\ \ \ | |/ / |/| | RasterizerStorageRD: Don't override format value
| * | Don't override format valueqarmin2020-04-281-2/+0
| | |
* | | Merge pull request #37795 from Chaosus/shader_fix_const_order2Rémi Verschelde2020-04-293-7/+13
|\ \ \ | | | | | | | | Fix shader constant sorting
| * | | Fix shader constant sortingYuri Roubinsky2020-04-113-7/+13
| | | |
* | | | Fix copy paste array index bugqarmin2020-04-281-4/+4
| |/ / |/| |
* | | Rename InputFilter back to InputRémi Verschelde2020-04-283-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690.
* | | Fix "redefinition of 'ssr' with a different type" shader compile error.bruvzg2020-04-231-2/+2
| |/ |/|
* | Merge pull request #38116 from neikeq/index_buffer_create-defvalIgnacio Roldán Etcheverry2020-04-221-1/+1
|\ \ | | | | | | Fix missing DEFVAL for RenderingDevice.index_buffer_create
| * | Fix missing DEFVAL for RenderingDevice.index_buffer_createIgnacio Etcheverry2020-04-221-1/+1
| | |
* | | Register the DisplayServer Singletonmuiroc2020-04-211-0/+1
|/ /
* | Add proper type to most public API uses of ArrayJuan Linietsky2020-04-216-101/+63
| |
* | Exposed RenderingDevice to script APIJuan Linietsky2020-04-205-7/+1627
| | | | | | | | | | | | | | | | | | | | | | | | | | Also added an easier way to load native GLSL shaders. Extras: Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload. Note: The precommit hooks are broken because they don't seem to support enums from one class being used in another. Feel free to fix this after merging this PR.
* | Merge pull request #37970 from SkyLucilfer/ServerTypoRémi Verschelde2020-04-201-1/+1
|\ \ | | | | | | Correct typo mistake of profiler_add_frame_data argument in physics 3d server
| * | Correct typo mistake of profiler_add_frame_data argument in physics 3d serverSkyJJ2020-04-171-1/+1
| | |
* | | Merge pull request #38039 from akien-mga/docdata-skip-unexposedRémi Verschelde2020-04-201-5/+6
|\ \ \ | | | | | | | | DocData: Skip unexposed classes
| * | | DocData: Skip unexposed classesRémi Verschelde2020-04-201-5/+6
| | | | | | | | | | | | | | | | Properly expose classes that we actually want accessible.
* | | | doc: Sync classref with current sourceRémi Verschelde2020-04-202-24/+51
|/ / / | | | | | | | | | Add missing enum bindings.
* | | Merge pull request #37947 from clayjohn/DOCS-rendering-updateRémi Verschelde2020-04-201-0/+4
|\ \ \ | | | | | | | | Update many docs with recent rendering changes
| * | | Update many docs with recent rendering changesclayjohn2020-04-171-0/+4
| | | |
* | | | Ability to create local RenderingDevice instances.Juan Linietsky2020-04-182-1/+8
| |/ / |/| |
* | | Merge pull request #37949 from reduz/implement-global-shader-uniformsRémi Verschelde2020-04-1723-34/+1702
|\ \ \ | | | | | | | | Implement global and per instance shader uniforms.