Commit graph

108 commits

Author SHA1 Message Date
Fabio Alessandrelli
417c54b871 Remove unused ip_unix member from OSX/server. 2020-01-14 17:33:49 +01:00
Rémi Verschelde
c7b701dfd2 Image: Include S3TC compression via Squish in non-tools build
We already build Squish in templates build for S3TC decompression,
so we can as well expose the compression feature.

Fixes #25640.
2020-01-13 15:58:49 +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
bruvzg
2ef8c5fac5
iOS modular build and export implementation. 2019-12-01 21:57:18 +02:00
IAmActuallyCthulhu
82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
qarmin
14c16d6851 Added Thread Sanitizer 2019-08-07 12:01:14 +02:00
Cameron Reikes
0584911f9f CameraServer is needed for editor node
- Editor asks ClassDB for docs
 - ClassDB asks CameraFeed for default parameters
 - In CameraFeed's constructor, polls CameraServer
2019-07-16 15:45:40 -07:00
Fabio Alessandrelli
aae6c075aa Remove libwebsocket. No longer used, yay! 2019-07-04 15:03:04 +02:00
Rémi Verschelde
b0d41847ed SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
It's the recommended way to set those, and is more portable
(automatically prepends -D for GCC/Clang and /D for MSVC).

We still use CPPFLAGS for some pre-processor flags which are not
defines.
2019-07-03 09:59:04 +02:00
Ibrahn Sahir
5e24611241 Png driver reworked to use libpng 1.6 simplified API
Wrapped libpng usage in a pair of functions under PNGDriverCommon,
which convert between Godot Image and png data.
Switched to libpng 1.6 simplified API for ease of maintenance.
Implemented ImageLoaderPNG and ResourceSaverPNG in terms of
PNGDriverCommon functions.
Travis, switched to builtin libpng (thus builtin freetype and zlib also)
so we can build on Xenial.
2019-06-19 11:05:58 +01:00
Rémi Verschelde
99acec63f1 bullet: Sync with current upstream master branch
This updates our local copy to commit 5ec8339b6fc491e3f09a34a4516e82787f053fcc.
We need a recent master commit for some new features that we use in Godot
(see #25543 and #28909).

To avoid warnings generated by Bullet headers included in our own module,
we include those headers with -isystem on GCC and Clang.

Fixes #29503.
2019-06-11 13:19:42 +02:00
hbina085
f78baa5f93 added a const keyword for a methods that return constant literal... 2019-05-21 02:16:30 -04:00
Rémi Verschelde
d52b70fb5e SCons: Always use env.Prepend for CPPPATH
Include paths are processed from left to right, so we use Prepend to
ensure that paths to bundled thirdparty files will have precedence over
system paths (e.g. `/usr/include` should have lowest priority).
2019-04-30 13:12:06 +02:00
Rémi Verschelde
c2a669a9f0 SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGS
Many contributors (me included) did not fully understand what CCFLAGS,
CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them
in the way they are intended to be.

As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html

- CCFLAGS: General options that are passed to the C and C++ compilers.
- CFLAGS: General options that are passed to the C compiler (C only;
  not C++).
- CXXFLAGS: General options that are passed to the C++ compiler. By
  default, this includes the value of $CCFLAGS, so that setting
  $CCFLAGS affects both C and C++ compilation.
- CPPFLAGS: User-specified C preprocessor options. These will be
  included in any command that uses the C preprocessor, including not
  just compilation of C and C++ source files [...], but also [...]
  Fortran [...] and [...] assembly language source file[s].

TL;DR: Compiler options go to CCFLAGS, unless they must be restricted
to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to
CPPFLAGS.
2019-04-24 16:57:58 +02:00
Guilherme Felipe
1bae73d7d0 Add Input::get_current_cursor_shape
[Clean up] Removed unused/unnecessary methods.
2019-04-15 15:22:09 -03:00
Hendrikto
49a81308c0 Remove unused imports 2019-04-06 18:05:05 +02:00
Rémi Verschelde
e4a96164b6 SCons: add methods.using_clang to check used compiler
Also rename `use_gcc` to `using_gcc` to make it clear that it returns
a config but does not alter it.
2019-04-05 12:51:15 +02:00
Rémi Verschelde
44f1b390a3 SCons: Fix python3 compat for builtin_bullet=no 2019-04-03 11:25:01 +02:00
Hugo Locurcio
9e912a4c89
Update the server platform's detect.py to match x11's
This adds support for LTO, UBSAN/ASAN/LSAN, debugging symbols options
and `optimize=size` in the `server` platform.
2019-03-05 22:22:10 +01:00
Rémi Verschelde
51c9ffaec0 Drop RtAudio driver on Windows
We've been defaulting to WASAPI since 3.0 and it's superior to RtAudio
in all aspects.

Obsoletes and closes #25503.

Also enable WINMIDI on MinGW, this had been missed initially.

Fix os_windows.cpp and crash_handler_windows.cpp which had weird
dependencies on RtAudio.h's includes (ugh).
2019-02-20 13:47:01 +01:00
Rémi Verschelde
bc26d0d6cd Platform: Ensure classes match their header filename
Also drop some unused files.

Renamed:
- `platform/iphone/sem_iphone.h` -> `semaphore_iphone.h`
  (same for `osx`)
- `platform/uwp/gl_context_egl.h` -> `context_egl_uwp.h`
- in `platform/windows`: `context_gl_win.h`, `crash_handler_win.h`,
  `godot_win.cpp`, `joypad.h` and `key_mapping_win.h` all renamed to
  use `windows`. Some classes renamed accordingly too.
- `EditorExportAndroid` and `EditorExportUWP` renamed to
  `EditorExportPlatformAndroid` and `EditorExportPlatformUWP`
- `power_android` and `power_osx` renamed to `PowerAndroid` and
  `PowerOSX`
- `OSUWP` renamed to `OS_UWP`

Dropped:
- `platform/windows/ctxgl_procaddr.h`
2019-02-12 16:56:25 +01:00
Hein-Pieter van Braam
e5b335d367 Don't use -ffast-math or other unsafe math optimizations
Godot supports many different compilers and for production releases we
have to support 3 currently: GCC8, Clang6, and MSVC2017. These compilers
all do slightly different things with -ffast-math and it is causing
issues now. See #24841, #24540, #10758, #10070. And probably other
complaints about physics differences between release and release_debug
builds.

I've done some performance comparisons on Linux x86_64. All tests are
ran 20 times.

Bunnymark: (higher is better)
(bunnies)    min    max  stdev average
fast-math   7332   7597    71     7432
this pr     7379   7779   108     7621 (102%)

FPBench (gdscript port http://fpbench.org/) (lower is better)
(ms)
fast-math  15441  16127   192    15764
this pr    15671  16855   326    16001  (99%)

Float_add (adding floats in a tight loop) (lower is better)
(sec)
fast-math   5.49   5.78  0.07     5.65
this pr     5.65   5.90  0.06     5.76  (98%)

Float_div (dividing floats in a tight loop) (lower is better)
(sec)
fast-math  11.70  12.36  0.18    11.99
this pr    11.92  12.32  0.12    12.12  (99%)

Float_mul (multiplying floats in a tight loop) (lower is better)
(sec)
fast-math  11.72  12.17  0.12    11.93
this pr    12.01  12.62  0.17    12.26  (97%)

I have also looked at FPS numbers for tps-demo, 3d platformer, 2d
platformer, and sponza and could not find any measurable difference.

I believe that given the issues and oft-reported (physics) glitches on
release builds I believe that the couple of percent of tight-loop
floating point performance regression is well worth it.

This fixes #24540 and fixes #24841
2019-01-09 02:06:13 +01: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
Rémi Verschelde
d1f3b622f0 Fix missing/malformed license headers 2019-01-01 12:46:36 +01:00
Marc Gilleron
065e2670af Added basic support for custom resource savers and loaders 2018-12-15 05:34:53 +00:00
Ibrahn Sahir
9f172b634d Allow the server platform to build on linux again.
Fixed a logic error in platform/server/detect.py that prevented building
the server platform on linux.
2018-10-30 12:38:55 +00:00
Marcelo Fernandez
fe93bb03fe Server platform works on OS X too 2018-10-29 12:54:51 -03:00
Aaron Franke
37386f112b Remove redundant "== true" code
If it can be compared to a boolean, it can be evaluated as one in-place.
2018-10-06 16:12:36 -04:00
Rémi Verschelde
3a2ca68af3 SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs,
Export should only be used when exporting *new* objects.
2018-09-28 14:07:39 +02:00
Fabio Alessandrelli
b0f166987a Server platform builds (dummy) mobile_vr module.
Protect GL functions in mobile_vr with ifdefs.
2018-09-25 12:29:31 +02:00
Rémi Verschelde
5adf7aa6b7 SCons: Fix checks for clang in env['CXX']
They would match the whole path instead of only the filename.
2018-09-25 11:15:25 +02: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
Rémi Verschelde
814fdd3985 Fix some more build issues after c69de2ba4
Fixes #20301.
2018-07-20 11:56:18 +02:00
Rémi Verschelde
8c9e10553c Fix build issues and typos after c69de2ba4 2018-07-20 08:37:10 +02:00
Hugo Locurcio
53e94a1ce1
Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
Rémi Verschelde
7d392cd6f4 SCons: Allow unbundling libwebsockets and miniupnpc 2018-06-07 10:42:30 +02:00
Gustav Lund
3dcf338ebb Dummy texture importer
Added a dummy importer for textures to use with the server platform.
Allows for running a project in headless mode without crashing when loading scenes containing textured objects
Also as a result decreases load time as no image files have to be loaded.
2018-05-09 08:13:02 +02:00
Rémi Verschelde
e619727e99 SCons: Fix linking system pcre2 on server platform
Fixes #17245.
2018-03-04 13:46:54 +01:00
Fabio Alessandrelli
8f9914bd94 Fix server build on FreeBSD 2018-03-01 02:16:52 +01:00
Rémi Verschelde
be7bfdfac3 server: Add support for statically linking libgcc and libstdc++ 2018-02-22 19:06:11 +01:00
K. S. Ernest (iFire) Lee
4e1923a931 Add dummy audio driver, fix dummy rasterizer 2018-02-15 07:34:11 -08:00
Fabio Alessandrelli
2de10aa467 Fixes to OS_Server and DummyRasterizer to match new signatures 2018-02-15 07:34:11 -08:00
Fabio Alessandrelli
6784d743f7 server platform now compiles and run on linux.
Seems to also be able to do exports of some demos I tried.
2018-02-15 07:34:11 -08:00
Fabio Alessandrelli
6fcc8b7e1f Deleting OpenSSL module and library 2018-02-14 01:26:34 +01:00
Rémi Verschelde
9ba5fb87f0 Bullet: allow unbundling only if > 2.87
Looks like we are using cutting edge methods which are not even
if the current stable 2.87.
2018-01-26 19:17:24 +01:00
Rémi Verschelde
e141845bfb SCons: Allow unbundling bullet on Linux (only 2.87+) 2018-01-13 15:16:22 +01:00
Rémi Verschelde
db49f35ab8 SCons: Fix usage of LD when we meant LINK
Also made LINK and CXXFLAGS configurable as command line options.
Note that LINK currently expects the *compiler* that will be used
for linking and will call its configured linker behind the scenes
(so g++, clang++, etc., not ld.gold). See #15364 for details.
2018-01-05 20:37:45 +01: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
Duy-Nguyen TA
322cb08dd9 Fix macOS and other builds after #15299
Commit ammended by @akien-mga to fix more platforms.
2018-01-04 19:48:05 +01:00
Emmanuel Leblond
e315c94900 Change OS::initialize signature to return Error (fix segfault on x11) 2018-01-04 15:15:55 +01:00