Commit graph

59 commits

Author SHA1 Message Date
Hugo Locurcio c012fbc8b2
Rename PROPERTY_USAGE_NOEDITOR to PROPERTY_USAGE_NO_EDITOR
This is consistent with other constants that include `NO`,
such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-11-03 23:06:17 +01:00
clayjohn 1b2cd9f251 Addition of FogVolumes, FogShaders, FogMaterial, and overhaul of VolumetricFog
Co-authored-by: Brian Semrau <brian.semrau@gmail.com>
2021-10-28 22:02:23 -07:00
Lightning_A c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
Aaron Franke 136dd887ad
Preserve original name in shader params cache 2021-08-05 18:31:08 -05:00
Aaron Franke 4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
Lightning_A e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Rémi Verschelde 9e328bb5b7
Core: Move DirAccess and FileAccess to core/io
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
2021-06-11 14:52:39 +02:00
Hugo Locurcio b191a7547c
Rename the .shader file extension to .gdshader
This lets third-party software recognize Godot shaders more easily,
without relying on guesswork since the `.shader` extension is generic.
2021-03-24 21:33:44 +01:00
reduz f8d03b98e7 Improve resource load cache
-Added a new method in Resource: reset_state , used for reloading the same resource from disk
-Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type)
-Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
2021-02-11 15:44:28 -03:00
Rafał Mikrut 7961a1dea3 Initialize class variables with default values in scene/ [2/2] 2021-02-09 18:24:36 +01:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Rémi Verschelde 9d2e8f2f27
Variant: Rename Type::_RID to Type::RID
The underscore prefix was used to avoid the conflict between the `RID` class
name and the matching enum value in `Variant::Type`.

This can be fixed differently by prefixing uses of the `RID` class in `Variant`
with the scope resolution operator, as done already for `AABB`.
2020-11-09 16:29:04 +01:00
Rémi Verschelde de284f931d
doc: Sync classref with current source 2020-09-04 10:43:11 +02:00
Marcus Brummer ffbb211bbe Set "shader_param/" prefix in Shader::has_param() 2020-06-04 17:41:10 +02:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
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.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
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.
2020-05-14 16:54:55 +02:00
Juan Linietsky ae09b55a19 Exposed RenderingDevice to script API
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.
2020-04-20 21:21:58 -03:00
Juan Linietsky a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -03:00
Bastiaan Olij c3fee7ba6c Add shader based background mode 2020-03-19 18:30:39 -07:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
Juan Linietsky 475e4ea67b Removed interactive loader, added proper thread loading. 2020-02-28 11:20:45 -03:00
Juan Linietsky 3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
qarmin 17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
elasota f5c7d64492 Don't open VisualShaders in the text shader editor, and don't support saving them with the "shader" extension. 2018-09-14 22:30:48 -04:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Juan Linietsky f6ce73f724 Visual Shaders are back. 2018-07-14 18:16:18 -03:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Juan Linietsky c2240a2a71 A promise is a promise, so added ability to load and save shaders as text files, closes #14431 2017-12-26 13:52:09 -03:00
Ruslan Mustakov 6106fd88d4 Remove junk output
Remove several prints that were added for engine debugging, but are
of no use to the end user, and only pollute the editor and game logs.
2017-10-13 12:40:19 +07:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Ignacio Etcheverry 32dd9a9f66 ClassDB: Provide the enum name of integer constants 2017-08-20 22:07:43 +02:00
Ignacio Etcheverry 2f290038d6 Removes type information from method binds 2017-08-10 07:17:50 +02:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Juan Linietsky 74808ac4d9 New particle system, mostly working, some small features missing. 2017-04-06 23:49:27 -03:00
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
2017-03-05 16:44:50 +01:00
Hein-Pieter van Braam 411ee71b4d Rename the _MD macro to D_METHOD
This new name also makes its purpose a little clearer

This is a step towards fixing #56
2017-02-13 12:50:02 +01:00
Hein-Pieter van Braam 0f687f0ccb Remove use of _SCS from ADD_METHOD
This saves typing and is a step towards fixing #56
2017-02-13 10:37:47 +01:00
Juan Linietsky 118eed485e ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class"
ClassDB has been exposed to GDScript.
OBJ_TYPE() macro is now GDCLASS()
2017-01-02 23:03:46 -03:00
Rémi Verschelde 3f3f5a5359 Merge remote-tracking branch 'origin/gles3' into gles3-on-master
Various merge conflicts have been fixed manually and some mistakes
might have been made - time will tell :)
2017-01-02 21:52:26 +01:00
Juan Linietsky c2a217c350 WIP particle system
Ability to enable and change MSAA settings
Ability to change VCT quality
Ability to enable/disable HDR rendering
2017-01-01 22:16:52 -03:00
Rémi Verschelde c7bc44d5ad Welcome in 2017, dear changelog reader!
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!
2017-01-01 22:03:33 +01:00
Juan Linietsky 850eaf7ed7 -the new shader language seems to work
-shader editor plugin can edit shaders
-code completion in shader editor plugin
2016-10-07 11:31:18 -03:00
Juan Linietsky 22d83bc9f6 Begining of GLES3 renderer:
-Most 2D drawing is implemented
-Missing shaders
-Missing all 3D
-Editor needs to be set on update always to be used, otherwise it does not refresh
-Large parts of editor not working
2016-10-03 21:35:16 +02:00
George Marques 5be9ff7b67 Update copyright to 2016 in headers 2016-01-01 11:50:53 -02:00
Franklin Sobrinho 1138103c63 Fix shader loading, making possible load .shd and .sgp from editor 2015-11-27 21:11:20 -03:00
Juan Linietsky 07e9741425 **WARNING BEFORE PULLING**
This push changes the binary and XML formats and bumps the major version to 2.0. As such, files saved in this version WILL NO LONGER WORK IN PREVIOUS VERSIONS. This compatibility breakage with older versions was required in order to properly provide project refactoring tools.
If I were you, unless you are brave, I would wait a week or two before pulling, in case of bugs :)

Summary of Changes

-New Filesystem dock, with filesystem & tree view modes.
-New refactoring tools, to change or fix dependencies.
-Quick search dialog, to quickly search any file
2015-08-23 20:15:56 -03:00