Commit Graph

962 Commits

Author SHA1 Message Date
John Firebaugh
083cee8956 [core] Correct boolean function interpolation 2016-12-22 18:14:00 -08:00
Ansis Brammanis
38b5cb0c77 [core, ios] replace altitude with fov
ported from -js: eb6c6596c6a7a61363d30356674e0002153b1d19

`altitude` was a terribly-named variable that was used to indirectly
control the fov. This should eliminate some confusion.

`altitude` was equivalent to `cameraToCenterDistance / height`
2016-12-21 15:46:36 -08:00
Konstantin Käfer
77db372123 [core] refactor URL parsing 2016-12-21 13:00:32 +01:00
Minh Nguyễn
a6b1773a44 Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.5-master
Also reran make style-code and manually discarded anything related to fill extrusion layers.
2016-12-20 12:41:40 -08:00
John Firebaugh
dad57df38e [core] Fix symbol rendering for multipoints
Ports https://github.com/mapbox/mapbox-gl-js/pull/3763 and https://github.com/mapbox/mapbox-gl-js/pull/3806.
2016-12-20 08:30:39 -08:00
Ivo van Dongen
bb6973ae90 [core] guard against duplicate layer ids 2016-12-13 10:03:05 -08:00
Ivo van Dongen
028db7feba [core] guard against duplicate layer ids 2016-12-12 09:05:23 -05:00
Konstantin Käfer
dc1bda435f [core] add util::isURL() for checking whether a string starts with a URL scheme 2016-12-07 10:46:43 +01:00
Minh Nguyễn
9456bec172 [test] Fixed Map-GetImage
Followup to #7096.
2016-12-05 18:48:00 -08:00
Roman Blum
1045934d5e [core, ios, macos] Add image accessor to MGLStyle (#7096)
* [core] Add interface to get image from sprite atlas

* [tests] Add tests for Map::getImage

* [ios, macos] WIP: get MGLImage for name from style

* [ios, macos] Fixed -imageForName:

Convert from sprite images to platform images using the existing encodePNG() function, which is also used for printing. Allow -imageForName: to return nil without an assertion failure. Added a basic test.
2016-12-05 17:16:13 -08:00
Ivo van Dongen
2c4e7ae70f [core] guard against duplicate source id’s 2016-12-02 11:25:30 -08:00
John Firebaugh
7d16824fda [core] Functions must have at least one stop
This is already enforced by the style validator in mapbox-gl-style-spec. Enforce it here too.
2016-12-01 09:00:06 -08:00
Chris Loer
5f29c3ba26 [core] Full support for line breaking bidirectional text using ICU bidi functionality.
- Trim whitespace from labels before determining their max-width for alignment.
 - Fix crash on labels that contain lines with only a single character of whitespace.
2016-11-30 11:54:08 -08:00
Ivo van Dongen
60e451174f [core] guard against duplicate source id’s 2016-11-30 19:35:29 +02:00
John Firebaugh
3d2d57cd30 [core] Assert valid range for color components 2016-11-29 06:52:24 -08:00
Konstantin Käfer
4fe071b518 [build] upgrade to variant 1.1.4 and dependencies 2016-11-28 18:02:00 +01:00
Ivo van Dongen
c810d16f0d [android][build] core tests - initial setup for rendering tests 2016-11-27 18:50:24 +02:00
Ivo van Dongen
d2c9750b6d [core] fix up online file source test so it compiles on android 2016-11-27 18:50:24 +02:00
Konstantin Käfer
e76de05402 [build] move logging to util 2016-11-22 20:58:51 +01:00
Konstantin Käfer
117863f111 [build] move headless rendering files to platform/default 2016-11-22 20:58:51 +01:00
Konstantin Käfer
3bc79e316e [build] move default ThreadPool implementation to platform/default 2016-11-22 20:58:51 +01:00
Bruno de Oliveira Abinader
97288cae96 [test] Check all zoom levels in Annotations.SymbolAnnotation 2016-11-18 09:13:53 +01:00
John Firebaugh
38fcbe21d4 [core] Convert style properties to a tuple-based approach
This converts the style property classes (CirclePaintProperties and so on) to the same tuple-based approach as gl::Attribute and gl::Uniform. The approach is outlined in https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md.

The main advantage of this approach is it allows writing algorithms that work on sets of style properties, without resorting to code generation or manually repetitive code. This lets us iterate on approaches to data-driven properties more easily.

Another advantage is that the cascading, unevaluated, and evaluated states of a set of properties exist as independent structures, instead of individual properties holding their own state. This is a more functional approach that makes data flow clearer and reduces state.
2016-11-17 15:13:38 -08:00
Chris Loer
d4fc66af39 [core] Add minimal line breaking support for RTL text. 2016-11-17 14:33:03 -08:00
Chris Loer
40b0c8d076 [core] Use UTF-16 instead of UTF-32 for label features to avoid extra conversions and reduce in-memory size.
Continue to use uint32 as glyph ID to maintain Glyph PBF, even though we're only using 16 bits of that uint32.
Use std::codecvt instead of boost::unicode_iterator for UTF8->UTF16 conversions.
2016-11-17 14:33:03 -08:00
Bruno de Oliveira Abinader
ad38ff230b [linux] Ensure EGL uses OpenGL ES 2.0 client API 2016-11-17 01:01:15 +01:00
Bruno de Oliveira Abinader
50f0f919c3 [test] Use shared headless display
Prevents some OpenGL implementations from bailing out.
2016-11-17 01:01:15 +01:00
John Firebaugh
d9862fa38c [tests] Disable "ContinuousRendering" test; causing spurious CI failures 2016-11-15 13:55:16 -08:00
Ivo van Dongen
13a118e3bd [core] symbol layer - recalculate style on icon/text size changes 2016-11-13 16:53:11 -08:00
Bruno de Oliveira Abinader
610f43cfd2 [linux] Use OSMesa when running Node tests 2016-11-13 16:10:36 -08:00
Ivo van Dongen
39b0bc0a40 [core] symbol layer - recalculate style on icon/text size changes 2016-11-11 20:18:16 +01:00
Konstantin Käfer
16def03117 [core] add continuous rendering test that terminates once it settles down
This is to test that continuous mode stops rerendering once no further changes are needed, i.e. to test the absence of "busy rendering".
2016-11-09 17:55:59 +01:00
Konstantin Käfer
bcdbbbcac2 [core] don't assign clip IDs to tiles that aren't rendered 2016-11-08 18:09:58 +01:00
John Firebaugh
66bdbc3b96 [core] Introduce gl::Program template 2016-11-08 08:09:29 -08:00
Konstantin Käfer
afd43eea3a [core] remove gl.hpp from all headers that don't need it 2016-11-04 21:24:05 +01:00
Mike Morris
39e9b30ebc [core] add more detail to invalid metrics error in createSpriteImage 2016-11-04 14:47:34 -04:00
Bruno de Oliveira Abinader
48a082a91b [linux] Use OSMesa when running Node tests 2016-11-04 18:43:08 +02:00
Bruno de Oliveira Abinader
549929cefd [core] Set bucket segments to initialize empty 2016-11-02 18:12:28 +02:00
Konstantin Käfer
7b50cac49f [core] convert GlyphAtlas to use managed texture handling 2016-11-01 18:41:52 +01:00
Konstantin Käfer
9e3839781f [core] convert SpriteAtlas to use managed texture handling 2016-11-01 18:41:52 +01:00
Bruno de Oliveira Abinader
e2981c890e Revert "[core] Don't use GL_LINEAR if panning w/o rotation nor pitch"
This reverts commit a70bfd8910.
2016-11-01 17:44:34 +02:00
Bruno de Oliveira Abinader
7b3e24d74a [core] Cleanup TransformState::getIntegerZoom 2016-10-31 16:53:07 +02:00
Bruno de Oliveira Abinader
a70bfd8910 [core] Don't use GL_LINEAR if panning w/o rotation nor pitch 2016-10-31 16:53:07 +02:00
John Firebaugh
39d5cb3250 [core] Use VAOs internally 2016-10-28 17:14:07 -07:00
John Firebaugh
0e57d10d77 [core] Modern C++ bindings for OpenGL 2016-10-28 17:14:01 -07:00
Konstantin Käfer
62b56b799a [core] change std::array<uint16_t, 2> to mbgl::Size 2016-10-27 18:30:58 -07:00
Konstantin Käfer
91272992f3 [core] don't load tiles from sources that aren't used 2016-10-27 16:15:36 -07:00
Konstantin Käfer
a4d259c33f [core] move gl::Context to Backend and refactor View 2016-10-25 13:52:36 -07:00
Konstantin Käfer
5cc390d694 [core] separate Backend from View for headless rendering 2016-10-25 13:52:36 -07:00
Ivo van Dongen
e31a2c1c11 [core] fixup formatting 2016-10-21 10:05:00 -07:00