Commit graph

691 commits

Author SHA1 Message Date
Juan Linietsky 6d15e15732 converted skeletons from uniform to texture 2017-03-12 13:08:56 -03:00
Rémi Verschelde 15c4d5006e Fix build issue with MSVC
windows.h is a mess.
2017-03-06 09:11:03 +01:00
Rémi Verschelde 6163343118 Make that Whole New World great again
Fix regression from 5dbf180 that broke Windows build.
2017-03-05 19:12:22 +01: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
Rémi Verschelde e1c1d7d1d7 Add a bunch of missing Godot headers in own files 2017-03-05 15:47:28 +01:00
Ferenc Arn 790611ef26 Added missing FIXMEs in PR #7878 2017-03-02 16:13:01 -06:00
Thaer Razeq f50488a361 Various fixes detected using PVS-Studio static analyzer.
- Add FIXME tags comments to some unfixed potential bugs
- Remove some checks (always false: unsigned never < 0)
- Fix some if statements based on reviews.
- Bunch of missing `else` statements
2017-02-28 07:52:02 -06:00
Juan Linietsky ffcd954211 Fixes to webgl/opengl es 3.0 for compatibility with webgl2.0, still does not work though 2017-02-22 19:14:21 -03:00
Juan Linietsky de0045cf1b -renamed globals.h to global_config.cpp (this seems to have caused a few modified files)
-.pck and .zip exporting redone, seems to be working..
2017-02-21 00:06:30 -03:00
Hein-Pieter van Braam b696beea65 Correct hash behavior for floating point numbers
This fixes HashMap where a key or part of a key is a floating point
number. To fix this the following has been done:

* HashMap now takes an extra template argument Comparator. This class
gets used to compare keys. The default Comperator now works correctly
for common types and floating point numbets.

* Variant implements ::hash_compare() now. This function implements
nan-safe comparison for all types with components that contain floating
point numbers.

* Variant now has a VariantComparator which uses Variant::hash_compare()
safely compare floating point components of variant's types.

* The hash functions for floating point numbers will now normalize NaN
values so that all floating point numbers that are NaN hash to the same
value.

C++ module writers that want to use HashMap internally in their modules
can now also safeguard against this crash by defining their on
Comperator class that safely compares their types.

GDScript users, or writers of modules that don't use HashMap internally
in their modules don't need to do anything.

This fixes #7354 and fixes #6947.
2017-02-16 18:44:29 +01:00
Juan Linietsky 903a3aa5f0 a ton of bug fixes to the renderer 2017-02-16 08:55:43 -03:00
Juan Linietsky da11d6d9e8 Many fixes to make exported scenes work better, still buggy. 2017-02-15 08:34:02 -03:00
Juan Linietsky d7fd86d51a -begin of export work, not done yet
-fixes to make scenes exported from godot 2.x work
2017-02-15 08:30:32 -03:00
Rémi Verschelde 70b9aa379d Merge pull request #7581 from Faless/v6_wild_bind
TCP/UDP listen bind to address and bugfixes
2017-02-12 23:31:40 +01:00
Hein-Pieter van Braam cff6840ff7 Add a simple signal handler for SIGCHLD on Unix
This fixes #6631
2017-02-09 22:08:35 +01:00
Juan Linietsky 07bbcf91f7 basic contact shadows implementation, will most likely need some polishing 2017-02-08 07:35:14 -03:00
Juan Linietsky 6bfaa0f12c shadows were not working in-editor for nvidia, fixed now 2017-02-06 20:18:35 -03:00
Juan Linietsky 5cc63dee0f ability to adjust propagation in gi probe 2017-02-06 05:12:15 -03:00
Juan Linietsky 6f2e16306a Several bugfixes, improving the import workflow 2017-02-06 00:38:39 -03:00
Rémi Verschelde 40e4c1f6ab Merge pull request #7689 from eska014/webgl2
Enable WebGL2 in web export, start fixing build
2017-02-02 08:18:42 +01:00
eska e06edc67c0 Enable WebGL2 in web export, start fixing build
Will not yet compile
2017-02-01 10:21:04 +01:00
Fabio Alessandrelli 5dc7c920bf Fix buffer size check in UDP socket.
We were reserving 12 bytes from the buffer for ip, port, and length, but since
IPv6 introduction we should be reserving 24 (IPv6 are 16 bytes)
2017-01-23 20:18:23 +01:00
Fabio Alessandrelli 9336857132 Use default UDP ring buffer size of 65536 for clients
We should probably create a specific function for setting the
recv buffer anyway. UDP sockets does not need to bind (listen)
to be able to call recvfrom. This is especially useful for clients
who just call set_send_address and start communicating with a server.
2017-01-23 20:18:23 +01:00
Fabio Alessandrelli 68dc969f8c Fix bug causing UDP socket to close after the first send if not listening
The ring buffer for receiving packets was not resized in constructor
2017-01-23 20:18:23 +01:00
Fabio Alessandrelli fa0cb7da0e Avoid deadlock when writing/reading data on a connecting TCP socket
TCP status polling is always performed as non blocking.
Trying to put a packet on a connecting socket will fail immediately.
2017-01-23 20:18:23 +01:00
Fabio Alessandrelli 619e7a2c8b Bind to IPv4 on OpenBSD when using wildcard
OpenBSD does not support binding on both IPv4 and IPv6 using the same socket
2017-01-23 20:18:23 +01:00
Fabio Alessandrelli 88a56ba783 Remove set_ip_type from network classes (no longer needed)
- TCP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `connect` -> resolve using best protocol (UNSPEC), socket from address type

- UDP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `put_packet`/`put_var` -> resolve using TYPE_ANY (UNSPEC), socket from address type
    (to change socket type you must first call `close` it)
2017-01-23 20:18:22 +01:00
Fabio Alessandrelli 2fe4ef6699 Implement UDP listen bind address 2017-01-23 20:18:18 +01:00
Fabio Alessandrelli b2839343ca Implement TCP Server bind address 2017-01-23 20:15:20 +01:00
Fabio Alessandrelli 98a7e2b4e0 Convert validity checks of IP_Address to is_valid method. 2017-01-23 20:15:20 +01:00
Fabio Alessandrelli e4b9b37ccf Avoid calling close when polling a UDP peer without socket 2017-01-23 20:15:20 +01:00
Juan Linietsky 0aa7242624 WIP new AudioServer, with buses, effects, etc. 2017-01-21 19:01:00 -03:00
Ferenc Arn 6f4f9aa6de Overloaded basic math funcs (double and float variants). Use real_t rather than float or double in generic functions (core/math) whenever possible.
Also inlined some more math functions.
2017-01-16 13:36:33 -06:00
Rémi Verschelde 7b059965e8 Adapt platforms to AudioServer refactoring
Fixes compilation on Windows and likely other platforms (at least
as far as AudioServer changes were concerned), though they were
not tested.
2017-01-16 19:19:45 +01:00
BastiaanOlij 3a02df7739 Working on compile issues for iOS 2017-01-16 23:14:13 +11:00
Rémi Verschelde 2a0ddc1e89 Style: Various fixes to play nice with clang-format 2017-01-16 08:49:52 +01:00
Rémi Verschelde f44ee891be Style: Fix statements ending with ';;' 2017-01-16 08:49:52 +01:00
Juan Linietsky b400c69cd4 Oops! Audio engine has vanished :D 2017-01-15 16:07:51 -03:00
Juan Linietsky 5dde810aa5 no more errors related to missing GlobalConfig::Get (or so I hope) 2017-01-14 21:57:22 -03:00
Rémi Verschelde a540e15cd1 Merge pull request #7513 from djrm/compilation_fix
Matrix32 -> Transform2D
2017-01-15 00:27:05 +01:00
Rémi Verschelde a992d3f74f Merge pull request #7510 from Faless/tcp_connect
TCP connect always opens the correct socket type
2017-01-15 00:26:46 +01:00
Rémi Verschelde 479790a841 StreamPeerWinsock: Fix changed declarations
Bug introduced in dcb95ec147.
2017-01-14 16:23:01 +01:00
Rémi Verschelde f4897fccf0 DirAccessWindows: Fix list_dir_begin return type
Fixes bug introduced in da4170540c.
2017-01-14 15:26:01 +01:00
Juan Linietsky dcb95ec147 removed duplicated functions in class hierarchy that were bound more than once
added a check to detect this case in the future
2017-01-14 11:10:42 -03:00
Rémi Verschelde 93ab45b6b5 Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part
with the rest of the code block, thus producing badly indented commented code.
2017-01-14 14:52:23 +01:00
Juan Linietsky da4170540c Fixed dir access return value, changed it to Error like all other funcs 2017-01-14 09:17:15 -03:00
Juan Linietsky 6c512b88c2 UDP.set_send_address to UDP.set_dest_address 2017-01-14 00:54:21 -03:00
Fabio Alessandrelli 55b4f3686d TCP connect always opens correct socket type
TCP client connections does not need to rely on ipv6 dual stack sockets
2017-01-13 19:02:39 +01:00
Daniel J. Ramirez aafaf2226f Matrix32 -> Transform2D 2017-01-13 01:34:32 -06:00
Fabio Alessandrelli 65483d57bf Improvements to scons defined WINVER/_WIN32_WINNT 2017-01-12 17:13:19 +01:00