Commit graph

542 commits

Author SHA1 Message Date
Rémi Verschelde 248bc9159c 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.
2016-10-15 18:10:18 +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 e6dc51a0f7 chibi: Move to a module 2016-10-15 12:20:53 +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 8981ff8a84 rtaudio: Split thirdparty files 2016-10-15 12:01:25 +02:00
Rémi Verschelde 5c12c9e69b mpc: Move to a module and split thirdparty libmpcdec 2016-10-15 11:50:42 +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 da09c6131b 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.
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 b1e8889d96 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 :)
2016-10-15 11:50:39 +02:00
Rémi Verschelde 16ba665db6 jpg: Make it a module and split jpgd thirdparty files
Similar rationale as in previous commit.
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
Rémi Verschelde f63bf12193 Drop nedmalloc which is apparently not used anymore 2016-10-14 18:21:23 +02:00
Rémi Verschelde d3d0507c05 Remove speex support, it is obsoleted by opus
As mentioned by upstream, Xiph.Org [0]:
> The Speex codec has been obsoleted by Opus. It will continue to be
> available, but since Opus is better than Speex in all aspects,
> users are encouraged to switch.

[0] http://www.speex.org/
2016-10-13 18:58:56 +02:00
Rémi Verschelde 78d97b060a Merge pull request #6605 from zaps166/old-gl-ext-funcs
Add compatibility with old OpenGL 2.1 drivers
2016-10-03 14:21:37 +02:00
Rémi Verschelde c46e205237 Merge pull request #6617 from zaps166/theora-x86-simd-fix
Fixes in Theora SCsub
2016-10-03 12:33:57 +02:00
mookiexl 0b12ebba11 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
2016-10-03 12:28:32 +02:00
Błażej Szczygieł 75299cf334 Fixes in Theora SCsub
- properly pass x86 assembly define to the compiler,
- don't compile unnecessary/encoder files.
2016-10-03 12:26:52 +02:00
Rémi Verschelde 463a42c71e Merge pull request #6606 from zaps166/don-crash-on-unsupported-gl
Don't crach when OpenGL version is unsupported
2016-10-03 11:54:49 +02:00
Rémi Verschelde 9fce85f9d7 Merge pull request #6501 from SuperUserNameMan/windows_compile_with_standalone_msvc
scons detects standalone MSVC on Windows
2016-10-03 11:36:44 +02:00
Błażej Szczygieł 7b8fe97888 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).
2016-09-25 13:09:23 +02:00
Błażej Szczygieł ca3b8deb78 Don't crach when OpenGL version is unsupported 2016-09-25 13:06:14 +02:00
Błażej Szczygieł a27fafb273 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
2016-09-25 12:58:22 +02:00
knd 708a028ce8 removed redundant assign operation in mesh_add_surface: elem_count is reassigned a value before the old one has been used. 2016-09-21 05:23:42 +03:00
Rémi Verschelde c05242e324 Merge pull request #6489 from zaps166/vorbis-no-enc
Vorbis: Don't compile unnecessary encoder files
2016-09-17 18:36:10 +02:00
Rémi Verschelde 80861b7d59 Merge pull request #6414 from RandomShaper/improve-shader-shadow
Expose additional light/shadow properties to canvas item shaders
2016-09-17 18:34:22 +02:00
yg2f 663d4ee7de scons detects standalone MSVC on Windows
Under Windows, Scons is now capable of detecting and compiling with
standalone MSVC compilers (aka "Visual C++ Build Tools").
http://landinghub.visualstudio.com/visual-cpp-build-tools

Tried with version 2015, and native x86 and x64 compilers under
Windows 10 pro 64 and Windows 8.1 64, with the default Win8 SDK
provided by the "Visual C++ Build Tools" web-installer.

Follow the same compiling instructions than for compiling with Visual
Studio, except that Visual Studio is no more required.

KNOWN ISSUES :
- ``methods.detect_visual_c_compiler_version()`` will emit a warning message
on computers where the ``VSINSTALLDIR`` environement variable is not present.
But it should compile just fine and still automatically detects the 32 or
64 bits according to the compiler you picked.

TODO :
- eventually, update ``platform/winrt/dectet.py`` with function
``methods.msvc_is_detected()`` and try to compile winrt/UWP with
these standalone compilers (if you did not select Win10 SDK when
installing the standalone tools, you can run it again).
- update doc to make users aware of "Visual C++ Build Tools" aka
"stadalone MSVC".
- eventually, update ``methods.detect_visual_c_compiler_version()``
2016-09-16 11:17:57 +02:00
Błażej Szczygieł 222bc07874 Vorbis: Don't compile unnecessary encoder files 2016-09-14 22:40:20 +02:00
Juan Linietsky fc61eb37ce Merge pull request #5920 from 29jm/fix-warnings
Fix some more warnings
2016-09-10 12:21:02 -03:00
Juan Linietsky e2aad59b59 Merge pull request #5962 from Alex-doc/Y_billboard
Implements Y billboard
2016-09-10 12:12:26 -03:00
Juan Linietsky 7a27d5d9e7 Merge pull request #6363 from vnen/winrt
Fix the support for WinRT/UWP
2016-09-10 11:47:42 -03:00
Pedro J. Estébanez 0960887625 Expose light shadow color to canvas item shaders 2016-09-07 01:52:54 +02:00
Pedro J. Estébanez b69e422af9 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.
2016-09-07 00:51:03 +02:00
George Marques 15458c8e6a
Add Windows Universal export to editor
- Use OPENSSL_ENABLED definition to the whole source to detect it
  anywhere.
- Add WinRT/UWP template files with manifest and default images.
2016-09-06 13:09:45 -03:00
George Marques 5f5db46e8d
Patch thirdy-party libraries to build for WinRT
- Patch enet code.
- Patch OpenSSL code and add shims for unavailable API.
- Add extra definition header for Freetype.
2016-09-03 19:46:26 -03:00
George Marques c9b82498b4
Fix drivers coding for WinRT
- Add a proper function to retrieve IP addresses.
- Solve issues with Windows FileAccess and DirAccess to use the same code
  for WinRT.
- Add patches to the GLES2 rasterizer to workaround ANGLE issues.
2016-09-03 19:36:44 -03:00
Juan Linietsky fb4d6d1db0 More visual script improvements
-Added anti-aliasing on lines
-Improved draw performance enormously
-Removed sequence ports for most nodes, current visual scripts will likely be broken now. Sorry!
2016-08-30 23:46:41 -03:00
Johan Manuel a4674bda47 Fix some comparisons between signed and unsigned integers 2016-08-13 13:21:35 +02:00
Johan Manuel 67b29e3b9e Fix some warnings about misleading indentation 2016-08-13 13:21:35 +02:00
Johan Manuel 046f94d3ac Remove some unused variables 2016-08-13 13:21:35 +02:00
Alex Piola c3b9ef8229 Implements Y billboard
Y billboard wasn't hooked up. This commit implements it.
2016-08-01 14:00:30 +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