Done with `autopep8 --select=E7`, fixes:
- E701 - Put colon-separated compound statement on separate lines.
- E702 - Put semicolon-separated compound statement on separate lines.
- E703 - Put semicolon-separated compound statement on separate lines.
- E711 - Fix comparison with None.
- E712 - Fix (trivial case of) comparison with boolean.
- E713 - Fix (trivial case of) non-membership check.
- E721 - Fix various deprecated code (via lib2to3).
The reordering of the SConscript includes allows to ensure that
stuff like the builtin zlib headers will be available for libpng.
Also moved glew back into global env, otherwise windows seems
not to find it... Kind of shooting in the dark with this multi-env
setup.
(cherry picked from commit 248bc9159c)
Comment out the weird workaround for building on Windows at it might
not be needed anymore. Testing needed to confirm.
(cherry picked from commit edbc0c0d0b)
Not fully happy about the way this one interacts with the various
platforms. Maybe the platform_config.h should be generated by the
SCsub instead of passing a define just to know where is the header.
(cherry picked from commit 36738ddda4)
This allows to pass include paths and flags only to a given thirdparty
library, thus preventing conflicts between their files (e.g. between
opus and openssl which both provide modes.h.
This also has the nice effect of making the compilation command smaller
for each module as it no longer related to all other modules, only the
final linking brings them together.
This however requires adding manually the ogg include path in opus
and vorbis when building against the builtin ogg, since it is no longer
in the global env.
Also simplified template 'thirdparty_<module>_sources' to
'thirdparty_sources'.
"Core" modules like cscript, gdscript, gridmap, ik and virtual_script
still use the main env_modules, but it could be changed if need be.
(cherry picked from commit da09c6131b)
Obviously removed the parts about enet and visual_script.
Took the opportunity to undo the Godot changed made to the
opus source. The opus module should eventually be built in its
own environment to avoid polluting others with too many include
dirs and defines.
TODO: Fix the platform/ stuff for opus.
(cherry picked from commit d9a291f641)
speex module was only added while cherry-picking, as speex is removed
in the master branch but we don't want to break compatibility in 2.1.x.
Unbundling wasn't done as the module uses the internal speex_free,
so it would require some more work.
Note that there are two Godot-specific changes made to libwebp
for the javascript/HTML5 platform. They are documented in the
README.md.
(cherry picked from commit ee3cf211c6)
They are not particularly packaged in Linux distros so we do not
facilitate unbundling via SCons. There could be done if/when there
is interest.
Also s/pnm/pbm/, long-lived typo :)
(cherry picked from commit b1e8889d96)
Uses the new structure agreed upon in #6157, but the thirdparty/ folder
does not behave following a logic similar to that of modules/ yet.
The png driver can't be moved to a module as discussed in #6157, as it's
required by core together with a few other ImageLoader implementations
(see drivers/register_driver_types.cpp:register_core_driver_types())
Dropped the possibility to disable PNG support, it's a core component
of Godot.
(cherry picked from commit 5fef84a135)
* Shadow fadeout exponent hardcoded for now, should be user configurable.
* optimization - skip shadows outside visible range
(cherry picked from commit 0b12ebba11)
If "glFramebufferTexture2D()" fails on old drivers the Vector is empty.
Don't allow to read from empty Vector (NULL pointer).
(cherry picked from commit 7b8fe97888)
If ARB_framebuffer_object is not supported, try to fall-back to
EXT_framebuffer_object if present.
In current version of godot, the way framebuffers are used is backward
compatible with the older EXT_framebuffer_object extension.
Fixes#6591
Done with SuperUserNameMan
(cherry picked from commit a27fafb273)
The macro USE_LIGHT_SHADOW_COLOR actually was being defined when the shader used SHADOW (the output shadow color), not the shadow color set for the light so it's better named USE_OUTPUT_SHADOW_COLOR. In 3D there's not that difference but renaming as well for consistency.
(cherry picked from commit b69e422af9)
The engine will still segfault, but the error message should be displayed by the
OS in a blocking manner, so that it will only crash once users have acknowledged
the error dialog.
Closes#1162.
The only differences we have with the upstream tarball are marked with
`// -GODOT-` comments for clarity. The changes we currently have are
just some defines for cross-platform configuration, and could likely be
moved to the SCons buildsystem (ideally in a sub-environment to avoid
having RtAudio-specific defines pollute the whole build log).
One change for WinRT was not kept, if it is needed it should ideally be
integrated upstream:
```
#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_WASAPI__)
-#ifdef WINRT_ENABLED
- #define MUTEX_INITIALIZE(A) InitializeCriticalSectionEx(A, 0, 0)
-#else
#define MUTEX_INITIALIZE(A) InitializeCriticalSection(A)
-#endif
```
Multi-character character constants are implementation defined,
and therefore they are risky to use for use when trying to be compatible
with so many different platforms. Fixes#2540.