Commit graph

598 commits

Author SHA1 Message Date
Fabio Alessandrelli
47ae6c6507 Move V6ONLY flag selection inside helpers
(cherry picked from commit 4d90a4fcd5)
2017-01-04 00:46:32 +01:00
Fabio Alessandrelli
5e79ac72b7 Automatically map IPv4 address to IPv6 when needed
(cherry picked from commit 9200da58e4)
2017-01-04 00:46:32 +01:00
Fabio Alessandrelli
a46a643f90 Use an instance variable for ip_type in raw sockets
PacketPeerUDP/StreamPeerTCP/TCP_Server now uses an instance variable
to store the selected ip_type (IPv4/IPv6/ANY, where ANY = dual stack).
All calls to resolve addresses, sending/receving data, connecting/listening
will use that socket type.

(cherry picked from commit 95bdd97768)
2017-01-04 00:46:32 +01:00
Fabio Alessandrelli
c030e602e5 Properly handle tcp connection failure
(cherry picked from commit 4f07b595a1)
2017-01-04 00:46:32 +01:00
Fabio Alessandrelli
19b31297ec Fix _set_ip_addr_port not setting the address.
(cherry picked from commit cdc1ca0f13)
2017-01-04 00:46:32 +01:00
Fabio Alessandrelli
4635671de5 Fix getaddrinfo failing on android
(cherry picked from commit 311f1f165b)
2017-01-04 00:46:32 +01:00
Pedro J. Estébanez
490f51a202 Fix error when fragment and lighting code share an uniform 2016-12-21 02:24:47 +01:00
Fabio Alessandrelli
e1dfaaf786 Define IPV6_V6ONLY flag if not defined on windows (old mingw versions)
(cherry picked from commit bdc7ca84ca)
2016-12-11 18:12:46 +01:00
Fabio Alessandrelli
754e9aa60a TCP/UDP Listen sockets can now be set to IPv6 only
(cherry picked from commit eb27e993f0)
2016-12-11 18:12:46 +01:00
Fabio Alessandrelli
70a6791150 Fix windows debugger connection problems.
Unify network socket creation between platform.
Ensure IPV6_V6ONLY flag is not set on sockets (allow IPv4 connection in IPv6 socket, dual-stack).

(cherry picked from commit 812908e236)
2016-12-11 18:12:45 +01:00
Fabio Alessandrelli
6e0de0cce8 TCPServer listen now default to IP type ANY (v6 socket with v4 support)
(cherry picked from commit ee69bd81cf)
2016-12-11 18:12:45 +01:00
Fabio Alessandrelli
04def2161e Fix PacketPeerUDP get_packet_port()
Properly convert port field from network to system ordering on incoming packets.

(cherry picked from commit 25e29972a9)
2016-12-11 18:12:45 +01:00
Fabio Alessandrelli
b3443fd848 Pass correct address size (ipv4,ipv6) to socket connect, bind, sendto
The address size passed to network system calls now reflects the the actual IP type (v4 or v6).
Fix Windows and OSX ipv6 sockets

(cherry picked from commit 80e911647c)
2016-12-11 12:35:06 +01:00
Ariel Manzur
d8b0070b8c added windows support for ipv6, cleaned up unix code
(cherry picked from commit 672225b710)
2016-12-11 12:35:06 +01:00
Ariel Manzur
53fea7f196 fixed some byte order and parsing problems
(cherry picked from commit 1d45f35a4a)
2016-12-11 12:35:06 +01:00
Ariel Manzur
fd1022fd29 adding ipv6
(cherry picked from commit 887a897c02)
2016-12-11 12:35:06 +01:00
eska
6d86a63648 OS additions and fixes for WebAssembly/asm.js
- Implement alert, shell_open, set_window_title
 - Add locale lookup, fixes #2477
 - Print without color control sequences
 - Move get_executable_path implementation to OS_JavaScript
2016-12-03 15:33:32 +01:00
Rémi Verschelde
ce54b6ea8b scons: Reorder options for clarity
Also prefix all thirdparty-related toggles with `builtin`.

(cherry picked from commit cc95d4448c)
2016-11-03 08:41:10 +01:00
Rémi Verschelde
eaf803f71e style: Various other PEP8 fixes in Python files
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).
2016-11-02 22:30:34 +01:00
Rémi Verschelde
e259bf8bbb style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-02 22:28:28 +01:00
Rémi Verschelde
561c1f17a1 style: Start applying PEP8 to Python files, indentation issues
Done with `autopep8 --select=E1`, fixes:

- E101 - Reindent all lines.
- E112 - Fix under-indented comments.
- E113 - Fix over-indented comments.
- E115 - Fix under-indented comments.
- E116 - Fix over-indented comments.
- E121 - Fix a badly indented line.
- E122 - Fix a badly indented line.
- E123 - Fix a badly indented line.
- E124 - Fix a badly indented line.
- E125 - Fix indentation undistinguish from the next logical line.
- E126 - Fix a badly indented line.
- E127 - Fix a badly indented line.
- E128 - Fix a badly indented line.
- E129 - Fix a badly indented line.
2016-11-02 22:26:55 +01:00
Rémi Verschelde
62d1e39113 scons: Move lib splitting method to methods.py
Apparently it might still be necessary for some console ports.

(cherry picked from commit e34a5324c8)
2016-10-31 00:07:29 +01:00
Pedro J. Estébanez
b492dd78bd Adopt simpler strategy for big libs on Windows
(cherry picked from commit 51ad1c1668)
2016-10-31 00:05:42 +01:00
Rémi Verschelde
5a49e45d21 SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.

(cherry picked from commit fc8ccd5b8c)
2016-10-30 14:51:34 +01:00
Rémi Verschelde
f4414e3e03 png: Try to fix neon issue on iphone armv7
(cherry picked from commit e57042e8a9)
2016-10-30 14:51:34 +01:00
Rémi Verschelde
aa1367595e drivers: Refactor SCsub and drop redundant env_drivers clone
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)
2016-10-30 14:51:34 +01:00
Rémi Verschelde
d96842b80e freetype: Make it a module and split thirdparty library
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)
2016-10-30 14:51:33 +01:00
Rémi Verschelde
8bf3bc3449 chibi: Move to a module
(cherry picked from commit e6dc51a0f7)
2016-10-30 14:51:33 +01:00
Rémi Verschelde
f1bd2f6f56 zlib: Split thirdparty files, simplify scons option
(cherry picked from commit cbf52606f4)
2016-10-30 14:51:33 +01:00
Rémi Verschelde
e04ec9565b glew: Split thirdparty files and isolate env
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)
2016-10-30 14:51:33 +01:00
Rémi Verschelde
1022705707 squish: Move to a module and split thirdparty lib
(cherry picked from commit 8311a78df5)
2016-10-30 14:51:33 +01:00
Rémi Verschelde
4ff4177acc rtaudio: Split thirdparty files
(cherry picked from commit 8981ff8a84)
2016-10-30 14:51:33 +01:00
Rémi Verschelde
c8a97c3678 mpc: Move to a module and split thirdparty libmpcdec
(cherry picked from commit 5c12c9e69b)
2016-10-30 14:51:33 +01:00
Rémi Verschelde
82e8721715 theora: Move to a module and split thirdparty lib
Same rationale as the previous commits.

(cherry picked from commit cfcc8a20e8)
2016-10-30 14:51:32 +01:00
Rémi Verschelde
bfea3f1d9a modules: Clone env in each module
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.
2016-10-30 14:51:32 +01:00
Rémi Verschelde
4cd640f684 openssl: Move to a module and split thirdparty lib
Same rationale as the previous commits.

(cherry picked from commit 422196759f)

Removed the winrt-specific parts.
2016-10-30 14:51:32 +01:00
Rémi Verschelde
995dcb610c ogg/vorbis/opus/speex: Make them modules and unbundle thirdparty libs
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.
2016-10-30 14:51:31 +01:00
Rémi Verschelde
55414bc573 webp: Make it a module and unbundle libwebp thirdparty files
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)
2016-10-30 14:51:30 +01:00
Rémi Verschelde
819ccdd340 dds/etc1/pbm/pvr: Make those modules and split thirdparty files
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)
2016-10-30 14:51:30 +01:00
Rémi Verschelde
ea1e180e4a jpg: Make it a module and split jpgd thirdparty files
Similar rationale as in previous commit.

(cherry picked from commit 16ba665db6)
2016-10-30 14:51:30 +01:00
Rémi Verschelde
575e986bde png: Split library to thirdparty dir and allow unbundling
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)
2016-10-30 14:51:30 +01:00
Rémi Verschelde
846db09038 Drop nedmalloc which is apparently not used anymore
(cherry picked from commit f63bf12193)
2016-10-30 14:51:30 +01:00
mookiexl
f63b338e0f Limit directional shadow draw distance, fixes #559, optimization (#1991)
* Shadow fadeout exponent hardcoded for now, should be user configurable.
* optimization - skip shadows outside visible range
(cherry picked from commit 0b12ebba11)
2016-10-09 17:33:20 +02:00
Błażej Szczygieł
13108317ae Fixes in Theora SCsub
- properly pass x86 assembly define to the compiler,
- don't compile unnecessary/encoder files.

(cherry picked from commit 75299cf334)
2016-10-09 17:33:12 +02:00
Błażej Szczygieł
a827734e03 Don't crash in "_process_hdr()" if "framebuffer.luminance" is empty
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)
2016-10-09 17:22:01 +02:00
Błażej Szczygieł
f4f5855168 Don't crach when OpenGL version is unsupported
(cherry picked from commit ca3b8deb78)
2016-10-09 17:21:48 +02:00
Błażej Szczygieł
f4da1e9ed2 Add compatibility with old OpenGL 2.1 drivers
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)
2016-10-09 17:21:41 +02:00
knd
b9399e93ad removed redundant assign operation in mesh_add_surface: elem_count is reassigned a value before the old one has been used.
(cherry picked from commit 708a028ce8)
2016-10-09 17:20:20 +02:00
Błażej Szczygieł
d2aa006ddb Vorbis: Don't compile unnecessary encoder files
(cherry picked from commit 222bc07874)
2016-09-18 23:21:36 +02:00
Pedro J. Estébanez
c44757c2b7 Expose light shadow color to canvas item shaders
(cherry picked from commit 0960887625)
2016-09-18 23:11:08 +02:00
Pedro J. Estébanez
ffe5ecd67d Rename misleading define
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)
2016-09-18 23:10:26 +02:00
Rémi Verschelde
a155342eca GLES2: Check for GPU capabilities to display an error
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.
2016-07-25 23:08:46 +02:00
Rémi Verschelde
c1ab343f02 RtAudio: Update to upstream version 4.1.2
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
```
2016-07-23 13:25:25 +02:00
Rémi Verschelde
b13f430853 zlib: Update builtin version to upstream 1.2.8
Our only differences to the upstream distribution are:
- The `gz*.c` files are not included
- Z_PREFIX and Z_SOLO are defined in zconf.h
2016-07-23 13:06:54 +02:00
Rémi Verschelde
1d41a070f6 rg_etc1: Upstream version 1.04
From https://github.com/richgel999/rg-etc1
2016-07-23 12:44:40 +02:00
Rémi Verschelde
4d4cb1bfab FreeType: Update to upstream version 2.6.5
The only diffs to the upstream sources are to be found in `include/ft2build.h`
and `include/freetype/config/ftoption.h`.
2016-07-22 23:29:25 +02:00
Rémi Verschelde
b13bbcecc3 FreeType: Remove unnecessary subfolder
Also sort sources alphabetically for clarity.
2016-07-22 22:01:16 +02:00
Rémi Verschelde
6b70676306 FreeType: Reduce diff with upstream 2.5.0 version
The Godot specific changes to ftoption.h are indicated with a
`// -Godot-` comment for clarity.
See #5859 for details.
2016-07-22 21:51:30 +02:00
Rémi Verschelde
9698571d61 Fix multichar character constant warning
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.
2016-07-18 21:34:50 +02:00
Rémi Verschelde
22419082d9 Remove some noisy debug prints
Part of #5031
2016-07-17 18:25:21 +02:00
Rémi Verschelde
1f2110956b Merge pull request #5592 from volzhs/libwebp-0.5.1
Update webp driver to 0.5.1
2016-07-14 09:03:14 +02:00
Rémi Verschelde
68fbb8f8ac Drop obsolete "webpold" backup of previous webp version
Fixes #5252
2016-07-14 08:36:06 +02:00
George Marques
2c6d0d4905
Fix builtin OpenSSL configuration
Fixes a bug that happens on Windows 64-bits.
2016-07-09 20:13:35 -03:00
volzhs
e55c6f8232 Modified webp source codes for godot 2016-07-08 22:10:25 +09:00
volzhs
ddd446f274 Update webp driver to 0.5.1 (upstream) 2016-07-08 21:44:40 +09:00
Rémi Verschelde
3fcb9b1ec1 Removed unused variables (second pass) + dead code
Fixes various gcc 5.4.0 warnings for -Wunused-variable and -Wunused-but-set-variable
2016-07-07 23:15:59 +02:00
Rémi Verschelde
b6ac91c0e6 Removed unused variables (first pass)
Fixes various gcc 5.4.0 warnings for -Wunused-variable and -Wunused-but-set-variable
2016-07-07 23:15:03 +02:00
Rémi Verschelde
a28bf56ef9 GH linguist: properly detect .inc files as C++
Also drop two unnecessary speex buildsystem files.
2016-07-03 15:17:25 +02:00
Juan Linietsky
f9bd038ca7 Removed no longer needed check 2016-07-02 13:32:07 -03:00
Juan Linietsky
ffbc2e56c9 Fix some bugs in diraccess, closes #5288 2016-06-30 18:23:39 -03:00
Juan Linietsky
f56a0435f2 Turn on SNI in OpenSSL 2016-06-29 11:20:17 -03:00
Juan Linietsky
620da09b87 try to fix windows build 2016-06-25 15:20:37 -03:00
Juan Linietsky
8dac3bf3b1 Added function to notify ScriptLanguage when a thread is created/freed, allows scripts to allocate a stack there via TLS 2016-06-25 10:41:23 -03:00
Rémi Verschelde
9bf3ee7acc png: Do not output warnings as errors 2016-06-23 08:23:45 +02:00
J08nY
f0290e643b
libpng: New version 1.6.27
Warning: libpng 1.6 is strict about iCCp chunks being incorrect,
solution is to fix the profile. On *nix ImageMagicks "convert" works
on windows optiPNG.
2016-06-22 20:57:30 +02:00
Juan Linietsky
93441d6119 properly initialize loops to 0 in eventplayer 2016-06-20 14:46:17 -03:00
Juan Linietsky
8f7a1367fe fix loop counter for eventstream, closes #4493 2016-06-20 14:43:20 -03:00
J08nY
214f316cf9
libtheora: New version 1.1.1 2016-06-19 15:37:58 +02:00
J08nY
644e9076bb
libvorbis: New version 1.3.5 2016-06-19 15:37:49 +02:00
J08nY
98f23d27a4
libogg: New version 1.3.2 2016-06-19 14:39:38 +02:00
Daniel J. Ramirez
422fac5066 Removed lots of prints 2016-06-18 18:01:06 -05:00
Rémi Verschelde
bb3362fd12 Drop useless 3rd party files from nedmalloc and png
Part of #5272
2016-06-18 20:27:58 +02:00
Rémi Verschelde
80727b6896 Drop empty .cpp files for header-only classes
Part of #5272
2016-06-18 20:00:08 +02:00
George Marques
e048d1e0a2
Fix make_dir for long paths on Windows 2016-06-18 12:28:11 -03:00
Juan Linietsky
e3905a084e -made get_space_left() return values more homogenous, also for script, converted to mb, closes #4617 2016-06-18 11:32:45 -03:00
Juan Linietsky
61655d6dc2 Fixed make_dir and make_dir_recursive erros, closes #1680 closes #1872 2016-06-18 11:13:03 -03:00
Rémi Verschelde
a7fc04626a Add missing license headers in our source files (#5255)
Also removes a couple wrong Godot headers from third-party source files.
2016-06-18 14:46:12 +02:00
Błażej Szczygieł
aebad5de5f Fix Theora video playback without a Vorbis stream
- prevent audio resampler errors when number of channels is 0,
- don't check for 'audio_done' when there is no audio data.

(cherry picked from commit 763b29f34e)
2016-06-18 00:49:55 +02:00
Juan Linietsky
7f02627290 -Add visible IO errors when closing a file fails due to it being locked (most likely on windows), closes #4760 2016-06-13 10:10:50 -03:00
Juan Linietsky
3d95c82669 Merge pull request #5090 from akien-mga/glew-1.13.0
Upgrade embedded GLEW to version 1.13.0
2016-06-08 07:54:31 -03:00
J08nY
39260f9dca
RtAudio: proper under/overflow warning
fix #5102
2016-06-08 12:25:40 +02:00
Rémi Verschelde
5bed0af65e GLEW: Update to upstream version 1.13.0 (pristine)
This removes a custom redefinition of glewGetProcAddress,
which was apparently necessary for older Macs with buggy OpenGL
(see #5087).

The added source files are as provided in the upstream tarball.
2016-06-08 00:17:54 +02:00
Rémi Verschelde
768e925271 GLEW: Define static + enabled and includes via SCons
This allows us not to have to hack our definitions in the upstream files,
making it easier to upgrade to newer versions in the future.

For the include paths to work, the headers are moved to a GL subfolder to
match their upstream location.
2016-06-08 00:16:27 +02:00
Rémi Verschelde
4c658dc523 Haiku: Do not define GLEW_ENABLED to undefine it later
Partial revert of f61eb5fd8e.
2016-06-08 00:10:30 +02:00
Juan Linietsky
0c985913a7 Merge pull request #4092 from sanikoyes/Pr-etc1-pkm-loading
Add etc1(pkm) texture loading support
2016-06-06 22:14:11 -03:00
Juan Linietsky
be830d10c2 Merge pull request #5026 from Geequlim/patch9frame-extension
Enhanced Patch9Frame
2016-06-06 20:15:33 -03:00
Rémi Verschelde
7fd6977ef9 Merge pull request #5070 from zenvoid/master
Add missing license information for bundled libraries
2016-06-06 23:31:55 +02:00
Roberto
c0a8c4f6e4 Add missing license information (ogg/vorbis/opus) 2016-06-06 19:05:36 +02:00
Roberto
18fc2ccbe1 Add missing license information (Theora) 2016-06-06 16:32:37 +02:00
Roberto
f97f8971e3 Add missing license information (WebP) 2016-06-06 12:45:30 +02:00