Commit graph

445 commits

Author SHA1 Message Date
Poommetee Ketson 478fd21e07 Merge pull request #11575 from marcelofg55/move_path_to_trash
FileSystemDock will now remove files/dirs to trashcan using OS::move_to_trash
2017-10-02 23:52:09 +07:00
Felix M. Cobos ec644ccb69 Reduce gcc lto build time by telling the linker to
use the number of jobs indicated by -j
2017-09-26 17:04:04 +02:00
Marcelo Fernandez 20918587d3 FileSystemDock will now remove files/dirs to trashcan using OS::move_to_trash 2017-09-25 21:49:01 -03:00
Elliott Sales de Andrade 3e69d19116 Use BoolVariable in platform-specific options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade 45a9a680a3 Use BoolVariable for third-party options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade ffab67b8da Use BoolVariable in target/component/advanced options. 2017-09-25 14:36:02 -04:00
Elliott Sales de Andrade f9e463bce2 Use EnumVariable for choice-based build options. 2017-09-25 14:36:01 -04:00
Rémi Verschelde 4ac7f5acf9 Merge pull request #11519 from hpvb/fix-gcc-lto
Fix gcc lto

[ci skip]
2017-09-24 13:32:00 +02:00
Rémi Verschelde df5dab738a Merge pull request #11527 from QuLogic/system-zstd
Enable building against system zstd.
2017-09-24 08:58:38 +02:00
Elliott Sales de Andrade 00c03bdd2b Add support for OpenSSL 1.1.0.
This release hides many struct members which provides easier forward
compatibility but is a break from previous releases. A few small macros
provide compatibility between both 1.1.0 and 1.0.x.

Fixes #8624.
2017-09-24 02:11:02 -04:00
Elliott Sales de Andrade a408388623 Enable building against system zstd. 2017-09-23 23:46:47 -04:00
Hein-Pieter van Braam 43757fcc85 Fix gcc lto
This repairs LTO on X11 and adds it to MingW targets. The difference in
linktime is substantial, but runtime performance is quite a bit better.
2017-09-23 22:55:26 +02:00
Rémi Verschelde e8a0c5da77 Merge pull request #11243 from hpvb/add-debug-info-on-release
Create separate debug info files by default
2017-09-21 10:30:17 +02:00
Rémi Verschelde 0eec37e247 Merge pull request #11141 from fcobos/x11_borderless_switch_fix
X11 - Adding borders back to a borderless window was not working.
2017-09-21 10:23:52 +02:00
letheed 5ad9be4c24 Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:

* pos -> position
* rot -> rotation
* loc -> location

C++ variables are left as is.
2017-09-20 13:11:10 +02:00
Marcelo Fernandez 9a0aa45d5c Fix crash handler not including stdlib.h 2017-09-19 11:21:45 -03:00
Marcelo Fernandez ff1e0a3e2c Prevent running the crash_handler when a debugger is present on windows 2017-09-18 16:29:23 -03:00
Rémi Verschelde 53bbc046ee Merge pull request #11252 from marcelofg55/fix_noaudio_crash
Fix crash when no audio driver is available
2017-09-17 22:48:22 +02:00
Marcelo Fernandez 3528b1e571 Fix x11 exported executables not getting the +x flag 2017-09-17 14:40:58 -03:00
Hein-Pieter van Braam 88be952fc9 Create separate debug info files by default
Now that we have a built-in stacktrace on a segfault it would be useful
to have debug information on debug_release builds so that bugreports can
include this information. Without this debug info we will still get
function names in the backtrace but not file location.

This commit will by default build all targets with minimal debug info
and then strip the information into separate files. On MacOS this is a
.dSYM file, on Linux/MingW this is a .debug file. MacOSX will
automatically load a dSYM file if it exists in its debugger. On
Linux/MingW we create a 'gnu debuglink' meaning that gdb and friends
will automatically find the debug symbols if they exist.

Existing workflow for developers does not change at all, except that we
now create two instead of one build artifact by default.

This commit also adds a 'debug_symbols' option to X11, MacOS, and MingW
targets. The default is 'yes' which corresponds to -g1. The alternatives
are 'no' (don't generate debug infos at all) or 'full' which runs with
-g2. A target=debug build will now build with -g3.
2017-09-16 12:00:46 +02:00
Thomas Herzog 7dffed485b Merge pull request #11230 from maxim-sheronov/fix_enum_bindings
Fix enums bindings
2017-09-15 08:43:35 +02:00
Andreas Haas 9488f06e4a
X11: Fix gamepads not being added whith udev.
Seems like this property isn't present on some gamepads...
Fixes #10958
2017-09-14 22:50:40 +02:00
Marcelo Fernandez 7a4c0ff35e Fix crash when no audio driver is available 2017-09-13 20:54:55 -03:00
Maxim Sheronov 0fffa45158 Fix enums bindings
Add missed bindings for enums
Move some enums to class to have correct output of api.json
2017-09-13 20:57:07 +03:00
Marcelo Fernandez 83fe937362 Added a crash handler to dump the backtrace on Windows, Linux and OS X 2017-09-13 10:07:23 -03:00
Felix M. Cobos 2e74bf488b Adding borders back to a borderless window was not working. 2017-09-12 18:53:34 +02:00
Felix M. Cobos 3b5ee014bd Hint the window manager to disable desktop compositing in fullscreen mode. 2017-09-09 23:24:19 +02:00
Poommetee Ketson 459f526119 Fix typos 'a' and 'an' 2017-09-02 21:19:06 +07:00
Rémi Verschelde 0cee288c11 Merge pull request #10148 from leezh/pcre2
Replacement of internal RegEx with PCRE2
2017-08-31 11:56:19 +02:00
Hein-Pieter van Braam d44414c711 Disable -ffast-math for etc2comp
Apparently -ffast-math generates incorrect code with recent versions of
GCC and Clang. The manual page for GCC warns about this possibility.

In my tests it doesn't actually appear to be measurably slower in this
case, and this is used in a batch process so it seems safe to disable
this.

This fixes #10758 and fixes #10070
2017-08-30 11:51:24 +02:00
Rémi Verschelde 7ad14e7a3e Dead code tells no tales 2017-08-27 22:13:45 +02:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Rémi Verschelde 612099e377 Merge pull request #10591 from Rubonnek/possible-null-ptr-dereference
Added/Fixed null pointer checks
2017-08-27 02:10:56 +02:00
Rémi Verschelde ea55b400d9 Merge pull request #10598 from Rubonnek/free-memory
Free memory when Main::setup returns an error
2017-08-27 02:10:41 +02:00
Wilson E. Alvarez 7a07895920 Added/Fixed null pointer checks 2017-08-26 16:58:47 -04:00
Wilson E. Alvarez bd257153dc Free memory when Main::setup returns an error 2017-08-25 21:12:19 -04:00
Wilson E. Alvarez 1577f41653 Fixed several memory leaks 2017-08-25 08:47:05 -04:00
Rémi Verschelde 7f49e2a7a0 Merge pull request #10487 from marcelofg55/curscr_as_default
p_screen param from get_screen_* funcs now default to the current screen
2017-08-22 08:12:04 +02:00
Marcelo Fernandez 63f847b306 p_screen param from get_screen_* funcs now default to the current screen 2017-08-21 18:28:29 -03:00
Wilson E. Alvarez 738d2ab969 Removed unnecessary assignments 2017-08-21 15:15:55 -04:00
Zher Huei Lee e3e2f06324 Replacement of internal RegEx with PCRE2
The pattern and replacement matching behaviour has been changed purely
due to the nature of switching to a standards-compliant library.

One mistake in the previous behaviour was that named groups didn't have
a number. This has been corrected.

As names are actually just an alias of numbered groups,
RegExMatch::get_name_dict() is now get_names() and is a dict
referring to the group number it represents.

Duplicate names are enabled and the with the first matching instance
used.

Due the lack of a suitable equivalent in PCRE2, RegExMatch::expand() was
removed.
2017-08-19 19:29:14 +08:00
Richard Adenling 398e0930dc Set the X11 class hint before mapping the window
Setting the class hint before mapping the window will allow some
window managers to determine if a window should be treated specially.
This is also in accordance with the ICCCM spec which says that
WM_CLASS should only be changed when a window is in a
withdrawn (unmapped) state.

Fixes #10429
2017-08-19 00:16:46 +02:00
TwistedTwigleg 00f6c85928 Synchronize parameter names in definition and declaration
Fixes #10244.
2017-08-16 17:22:23 +02:00
Rémi Verschelde 2bb8ab7b89 Merge pull request #10045 from marcelofg55/audioserver_finish
Fix double finalisation of audio drivers
2017-08-07 11:11:03 +02:00
Bojidar Marinov 7b7c7c8dc0
Rename KEY_RETURN to KEY_ENTER and KEY_ENTER to KEY_KP_ENTER
Closes #7695
2017-08-06 16:26:07 +03:00
Marcelo Fernandez 1ca107a057 Fix double finalisation of audio drivers 2017-08-02 11:45:19 -03:00
Rémi Verschelde 411f09a512 Merge pull request #9887 from StraToN/power-fix-x11
Fix power management on x11 platform and removes explicit NULL pointer dereference
2017-07-27 08:53:27 +02:00
Julian Murgia 71dcb7fcc4 Fixes power management on x11 platform and removes explicit NULL pointer dereference. 2017-07-26 23:29:51 +02:00
bruvzg 7de7ca8ae4 Remove duplicate keycode constant for Numpad Enter key. 2017-07-26 14:43:02 +03:00
Jia Wang 2f5b7f8777 Workaround to allow pasting unicode characters from X selection.
Fixes #2491.
Fixes #9787.
2017-07-25 08:00:48 +08:00
Juan Linietsky 25678b1876 -Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
2017-07-19 17:06:03 -03:00
Marcelo Fernandez 11dbca419c Fix fullscreen on X11 for non-resizable windows 2017-07-13 13:08:38 -03:00
geequlim 7358766ff6 IME window follow the input cursor.
Abstruct set_ime_position to OS class.
Update ime position for LineEdit and TextEdit.
2017-07-11 18:36:20 +08:00
Poommetee Ketson 2fd204c35e Refactor 'treshold' to 'threshold' 2017-07-08 22:24:56 +07:00
Marcelo Fernandez c3563b266f Implemented borderless window functions on Linux. 2017-07-05 12:19:24 -03:00
Rémi Verschelde a2586a2119 Merge pull request #9396 from sowfelicity/x11-ime-echo
Workaround for IME and echo events on Linux (fixes #29 #7106 #9381):
2017-07-03 23:48:57 +02:00
Rémi Verschelde e91a267a7c Buildsystem: Improve detect.py readability and fix issues
Tried to organize the configure(env) calls in sections, using the same order
for all platforms whenever possible.

Apart from cosmetic changes, the following issues were fixed:
- Android: cleanup linkage, remove GLESv1_CM and GLESv2
- iPhone: Remove obsolete "ios_gles22_override" option
- OSX:
  * Fix bits detection (default to 64) and remove obsolete "force_64_bits" option
    (closes #9449)
  * Make "fat" bits argument explicit
- Server: sync with X11
- Windows: clean up old DirectX 9 stuff
- X11:
  * Do not require system OpenSSL for building (closes #9443)
  * Fix typo'ed use_leak_sanitizer option
  * Fix .llvm suffix overriding custom extra_suffix
2017-07-01 08:20:51 +02:00
Jia Wang 098a888ec0 Workaround for IME and echo events on Linux:
Request detectable auto-repeat (Require XKB extension) to support
    echo events and IME at the same time. Fixes #29, #7106 and #9381.
2017-06-29 19:26:06 +08:00
Juan Linietsky e79e135841 Revert "Workaround for IME on Linux." 2017-06-25 20:09:16 -03:00
Rémi Verschelde 87fd71244b Merge pull request #9334 from Noshyaar/pr-genh
BuildSystem: generated files have .gen.extension
2017-06-25 11:08:36 +02:00
Poommetee Ketson e3998528e0 BuildSystem: generated files have .gen.extension 2017-06-25 07:55:01 +07:00
Jia Wang 41029eb1f0 Workaround for IME on Linux(fixes #29 #7106):
Workaround for supporting input method frameworks like SCIM,
    IBus, Fcitx, etc.

    The locale is set when the application starts.

    Workaround for input when the input context within the specified
    input method is not available.
2017-06-25 08:17:56 +08:00
Juan Linietsky 612ab8fcdb -Restored multithread capability to VisualServer
-Restored resource previews!
2017-06-09 00:24:18 -03:00
Andreas Haas 9bc5348961
InputEvent: Renamed "pos" property to "position"
Make the naming consistent with other classes.
2017-06-03 11:26:39 +02:00
Andreas Haas d6333066fc
X11: Turn warning about not finding cursor theme into verbose output.
Failing to get the cursor theme should not cause any issues since we're then using the default one anyway.
So I removed the warning and made it a verbose-only print instead, as people tend to mistake it for a real error..
(pretty much like `iCCP: known incorrect sRGB profile` :P)
2017-05-29 20:41:18 +02:00
Juan Linietsky 5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
Juan Linietsky 98a3296702 Removal of Image from Variant, converted to a Resource. 2017-05-17 07:37:45 -03:00
Rémi Verschelde c8aea60324 Improve documentation of thirdparty code snippets 2017-05-07 11:42:37 +02:00
Rémi Verschelde 2976801012 X11: Abort build if using OpenSSL 1.1.0+
Workaround until #8624 is fixed.
2017-05-06 19:01:10 +02:00
Rémi Verschelde 515f92d03b Fix property warnings and hide some debug prints
"ALL IS GOOD" was a lie.

In particular, removes verbose "path not recognized" false positive.

The actual logic is to (somewhat naively) check all ResourceFormatLoaders
and to pick the first good match, so no need to warn about the formats
that do not match the type hint.
2017-04-23 11:17:32 +02:00
Sergey Pusnei 8589ca3903 Rename [gs]et_pos to [gs]et_position for Controls
Control set_pos -> set_position
Control set_global_pos -> set_global_position
[gs]et_mouse_pos -> [gs]et_mouse_position
[gs]et_global_mouse_pos -> [gs]et_global_mouse_position
fixes #8005
2017-04-10 08:27:34 +02:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Juan Linietsky ce948ed63b Revert "8145 - Mouse Position is unknown until first mouse event on X11" 2017-04-06 13:08:42 -03:00
Sergey Pusnei c79e998d1f 8145 - Mouse Position is unknown until first mouse event on X11 & Win
- X11 update input->pos on EnterNotify
- X11 & Win call first-time events processing before main initialization
2017-03-28 19:18:40 -04:00
Rémi Verschelde 9d28a5e7d9 Merge pull request #8159 from Hinsbart/last_id
Input: Remove usage of platform dependent event IDs.
2017-03-27 08:52:58 +02:00
Rémi Verschelde d8f32637be SCons: Add option to toggle warnings (on by default)
All the warnings are factored out of the platform-specific files and moved to
SConstruct. Will have to check that it does not introduce regressions on some
platforms/compilers.

(cherry picked from commit 31107daa1a)
2017-03-26 21:58:37 +02:00
Andreas Haas c0b6756875
Input: Remove usage of platform dependent event IDs.
The ID property for InputEvents is set by `SceneTree` when sending the event down the tree.
So there's no need for the platform specific code to set this value when it will later be overriden anyway...
2017-03-26 15:59:32 +02:00
Rémi Verschelde debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00
Juan Linietsky c37fad650f Export working (for linux at least) 2017-03-21 19:34:26 -03:00
Andreas Haas fc84ccc468
X11: Don't reset mouse cursor theme.
On KDE (and possibly others) the "default" cursor theme is actually some system default, not the one you've set in the desktop setting.
This was especially annoying when using a white cursor, as Godot would then reset back to a dark one.
In my case it was also keeping the cursor from changing its shape.
2017-03-18 12:13:14 +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
Rémi Verschelde 49c065d29c Refactoring: rename tools/editor/ to editor/
The other subfolders of tools/ had already been moved to either
editor/, misc/ or thirdparty/, so the hiding the editor code that
deep was no longer meaningful.
2017-03-05 14:21:25 +01:00
Julian Murgia 94103c0c02 Add API to access battery power state
Done:
- X11, server (tested)
- Windows (developed, would be nice to retest)
- OSX (not tested)
Prepared (not developed):
- Android (code is here, but may not compile)
- iphone
- winrt
- bb10
- haiku
- javascript
2017-03-04 18:04:29 +01:00
Shlomi Fish 0ef3d22d98 Fix failing build on mageia v6 x64 linux.
There was an error about undeclared malloc()+free().
2017-02-27 21:24:46 +02:00
Rémi Verschelde 34a0aa6900 Merge pull request #7862 from Hinsbart/joypad_connections
Better handling of joypad device IDs.
2017-02-26 21:30:24 +01:00
Andreas Haas a175ac7032
Better handling of joypad device IDs.
Now InputDefault is responsible for giving out joypad device IDs to the platform, instead of each platform handling this itself.
This makes it possible for c++ modules to add their own "custom" gamepad devices, without the risk of messing up events in case the user also has regular gamepads attached (using the OS code).
For now, it's implemented for the main desktop platforms.
Possible targets for future work: android, uwp, javascript
2017-02-26 21:01:31 +01:00
Rémi Verschelde 7902444f38 Merge pull request #7834 from hpvb/x11-return-to-cwd-at-exit
X11 return to cwd at exit
2017-02-26 20:25:09 +01:00
Shlomi Fish 0a2c387d5c Fix some compilation warnings.
Redone the commit based on the input in
https://github.com/godotengine/godot/pull/7851 . Not all warnings were
fixed but it's a start.
2017-02-21 11:59:19 +02:00
Juan Linietsky f6950956bd Editor Export Settings Dialog is completed!! Now on to make some exporters.. 2017-02-19 23:21:35 -03:00
Hein-Pieter van Braam d0c2015fe1 X11 return to cwd at exit
During runtime godot calls chdir() several times. This doesn't really
matter normally but when using tools such as gprof the location of the
profiling data is kind of hard to intuit.

With this PR we simply store the current working directory at start and
restore it once we're almost done exiting.

This doesn't use the OS abstractions as when we need to get the current
workdir we haven't yet initialized it (by necessity). This would break
if we tried to build X11 for windows, but since the X11 target is
hardcoded to use the UNIX abstractions I don't think it matters.
2017-02-18 12:41:26 +01:00
Hein-Pieter van Braam f70afbe129 X11: Move audio driver finalize to the start of cleanup
The audio driver cleanup needs to happen at the start of finish
otherwise a race still seems to exist with the destruction of the
audioserver. I think that destroying the X resoures before has something
to do with it.
2017-02-17 17:59:06 +01:00
Hein-Pieter van Braam a7fcdad16d X11: Finalize audiodrivers on exit
The audiodrivers loaded by OS_X11 are not destroyed before the
audioserver is. This causes a segfault on exit.

The code is taken from os_windows.cpp which did have the cleanup code.
2017-02-17 10:41:41 +01:00
Rémi Verschelde 251e014b59 Merge pull request #7578 from baekdahl/master
x11: don't wait for window to be mapped
2017-02-02 08:21:05 +01:00
Rémi Verschelde 869d710198 Merge pull request #7683 from marcelofg55/master
Fix issues with set_window_resizable on x11
2017-02-02 08:17:14 +01:00
Rémi Verschelde 44d386ee80 Merge pull request #7645 from tagcup/x11_optimization_flags_v2
Use -Ofast on x11. Also introduced use_lto option.
2017-02-02 08:06:06 +01:00
marcelofg55 474e3ac055 Fix issues with set_window_resizable on x11 2017-01-30 13:25:48 -03:00
Ferenc Arn 7a85d25218 Use -Ofast on x11. Also introduced use_lto option.
debug_release doesn't turn off optimizations for release target now. Ensure that sanitizer options apply to both C and C++ files.

Built-in optimization/debug flags are prepended such that user-specified flags can override them.

Based on and around the discussion in PR #5194.
2017-01-26 19:32:27 -06:00
Juan Linietsky 96de0141cc Removed import/export system, will start new one from scratch. 2017-01-25 21:57:08 -03:00
Ilija Boshkov 1005a56e5a Added focus tracking in X11 and Windows classes, added new confined mouse mode (#7162) 2017-01-25 19:21:41 +01:00
Juan Linietsky 0aa7242624 WIP new AudioServer, with buses, effects, etc. 2017-01-21 19:01:00 -03:00
Jesper Bækdahl 8f7a3884fd x11: don't wait for window to be mapped 2017-01-19 09:38:40 +01:00
Rémi Verschelde 2a0ddc1e89 Style: Various fixes to play nice with clang-format 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
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 a97551902e rename Input.get_mouse_speed() to Input.get_last_mouse_speed() 2017-01-13 19:24:28 -03:00
Andreas Haas 4a6428aaee
Rename "joypad_linux" class to "JoypadLinux"
Named this class in GodotCase, so it fits with the rest of the codebase.
2017-01-08 22:22:00 +01:00
Rémi Verschelde 5bfa4227b3 Finish replacement of joystick by joypad
Some parts were forgotten in 547a577.
2017-01-08 21:33:37 +01:00
Juan Linietsky 547a57777b renamed joystick to joypad everywhere around source code! 2017-01-08 17:06:33 -03:00
Rémi Verschelde d945c4e58e x11: Improve logic for cross-dependencies between freetype, zlib and libpng
Fixes #7373.
2017-01-08 17:17:05 +01:00
Juan Linietsky 2ab83e1abb Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector 2017-01-07 18:26:38 -03:00
Rémi Verschelde 2a38a5eaa8 Remove bundled glew, obsoleted by glad
Also make Haiku load the glad header for GLES3 too,
though I haven't test it.
2017-01-06 22:56:51 +01:00
Rémi Verschelde dc0d08cc93 Move glad files to thirdparty dir 2017-01-06 22:42:19 +01: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
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 37f558cd7b Some BRDF fixes 2016-12-21 14:22:17 -03:00
Gustav Lund 2495e8a941 fix for crash when no ALSA or Pulse installed on linux 2016-12-12 10:47:41 +01:00
Rémi Verschelde f18470c199 Revert "X11: Fix maximized boot splash"
This reverts commit 8d3efe2b7d.
It introduced crashes for some users when trying to capture
the XConfigureNotify event.
2016-11-23 07:53:31 +01:00
Juan Linietsky 9d635f0629 Migrated from GLES to GLAD, fixes many issues. 2016-11-22 20:51:56 -03:00
Rémi Verschelde d5a9102a88 Merge pull request #7125 from Hinsbart/x11_maximize
X11: Fix maximized boot splash
2016-11-21 11:54:49 +01:00
Rémi Verschelde 4965ddfaa1 png: Allow building shared freetype with bundled libpng
This was the behaviour when building Godot 2.1, which allows to build against
Ubuntu 12.04 and its freetype that links old libpng12, while still bundling
libpng16.
2016-11-19 14:09:01 +01:00
Rémi Verschelde c32766a482 Revert "libpng: Fix erroneously linking against libpng12 on old distros"
This reverts commits 5fa1bb331a
and ec4be71fad.

Looks like Debian/Ubuntu are not even shipping libpng16 nowadays in their
stable releases, we'll have to go back to statically linking our own
libpng16 to wait for them to stop being 5 years behind everybody.
2016-11-19 13:39:03 +01:00
Rémi Verschelde 5fa1bb331a libpng: Fix erroneously linking against libpng12 on old distros
This bit us for 2.1.1 binaries built on Ubuntu 12.04 LTS where
libpng.pc apparently prioritizes libpng12.
2016-11-19 12:59:48 +01:00
Andreas Haas 8d3efe2b7d
X11: Fix maximized boot splash
When instructing the window manager to (un)maximize a window, the resulting resolution
is recieved via an XEvent of type "ConfigureNotify".

The problem here was that these events were only handled in the `OS_X11::process_xevents()` method,
which is initially called on the first iteration of the main loop.
Because of this, the VideoMode still hadn't been updated yet when doing the boot splash setup.
2016-11-16 02:04:39 +01:00
ISylvox b5c383fd61 vsnc --> vsync 2016-11-08 21:06:57 +07:00
Rémi Verschelde cc95d4448c scons: Reorder options for clarity
Also prefix all thirdparty-related toggles with `builtin`.
2016-11-03 07:45:08 +01:00
Rémi Verschelde 817dd7ccbb style: Fix PEP8 blank lines issues in Python files
Done with `autopep8 --select=E3,W3`, fixes:

- E301 - Add missing blank line.
- E302 - Add missing 2 blank lines.
- E303 - Remove extra blank lines.
- E304 - Remove blank line following function decorator.
- E309 - Add missing blank line.
- W391 - Remove trailing blank lines.
2016-11-01 00:35:16 +01:00
Rémi Verschelde d4c17700aa 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-01 00:35:16 +01:00
Rémi Verschelde 97c8508f5e 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-01 00:33:51 +01:00
Rémi Verschelde c6c13eb8fc Merge pull request #6490 from zaps166/webm-pr
Add WebM support
2016-10-30 18:12:00 +01:00
Błażej Szczygieł d710b265f8 Add WebM module
Use already existing libraries: libvorbis and libopus. Also use newly
added libraries: libvpx, libwebm, libsimplewebm.
2016-10-23 02:46:06 +02:00
Błażej Szczygieł 2bf4553fe0 SCons: Use colored output if available, change "colored"->"verbose" 2016-10-17 22:40:14 +02:00
Rémi Verschelde e96c49f849 Merge pull request #6850 from akien-mga/pr-scsub-shebang
SCsub: Add python shebang as a hint for syntax highlighting
2016-10-17 20:13:18 +02:00
Rémi Verschelde fc8ccd5b8c SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.
2016-10-17 20:10:46 +02:00
Błażej Szczygieł 4ffa8f224d Theora: Don't compile unnecessary files, rename "x86_opt_*" 2016-10-16 22:31:27 +02:00
Rémi Verschelde edbc0c0d0b 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.
2016-10-15 18:10:17 +02:00
Rémi Verschelde cbf52606f4 zlib: Split thirdparty files, simplify scons option 2016-10-15 12:20:47 +02:00
Rémi Verschelde 36738ddda4 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.
2016-10-15 12:01:28 +02:00
Rémi Verschelde 8311a78df5 squish: Move to a module and split thirdparty lib 2016-10-15 12:01:28 +02:00
Rémi Verschelde cfcc8a20e8 theora: Move to a module and split thirdparty lib
Same rationale as the previous commits.
2016-10-15 11:50:41 +02:00
Rémi Verschelde 422196759f openssl: Move to a module and split thirdparty lib
Same rationale as the previous commits.
2016-10-15 11:50:41 +02:00
Rémi Verschelde d9a291f641 ogg/vorbis/opus: 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.
2016-10-15 11:50:40 +02:00
Rémi Verschelde ee3cf211c6 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.
2016-10-15 11:50:39 +02:00
Rémi Verschelde c31ad71f10 enet: Split enet thirdparty files and allow unbundling
Building against shared libraries only implemented for Linux X11 so far.
TODO: Document Godot's modifications of upstream enet.
2016-10-15 11:50:39 +02:00
Rémi Verschelde 5fef84a135 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.
2016-10-15 11:50:39 +02: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
romeojulietthotel 94d6757a0d Use pkgconfig to locate ALSA libs (#6119)
* This allows building when ALSA libs are in a non-standard location. PKG_CONFIG_PATH alone is not enough as the final link fails. Adding this makes the final link succeed.

* The extra LIBS flag for alsa is not needed so removing.
2016-09-23 07:38:57 +02:00
Andreas Haas 6fcf2b2bd8
x11: Fix event.is_action() for release of modifier keys
The bug was that the release events for these also had the modifier state set, so the event comparison
failed.

Fixes #5901
2016-09-22 12:24:44 +02:00
Andreas Haas f59860f464
x11: Use proper sonames for loading libXrandr. 2016-08-11 17:40:59 +02:00
Rémi Verschelde 82d18f4c1c Merge pull request #5845 from hurikhan/x11_cleanup
Code cleanup in platform/x11
2016-07-22 08:35:26 +02:00