Commit Graph

2428 Commits

Author SHA1 Message Date
John Firebaugh
67ee51360c [core] Add Filter accessors 2016-06-02 14:51:39 -07:00
John Firebaugh
cadc617c76 [core] Introduce PropertyValue<T>
PropertyValue<T> represents the three possible types of style property value: undefined, constant, or function.
2016-06-02 14:51:39 -07:00
John Firebaugh
d7e1ecd19e [core] Generalize Map::{add,remove}CustomLayer 2016-06-02 14:51:39 -07:00
John Firebaugh
a43940afb2 [core] Runtime style layer API 2016-06-02 14:51:39 -07:00
John Firebaugh
1fb96d38a0 [tests] Tweak LineAnnotation test so that it reveals a bug; fix the bug 2016-06-02 14:47:35 -07:00
John Firebaugh
3689f52ef3 [core] Constrain annotation API to the supported geometry types 2016-06-01 17:37:01 -07:00
John Firebaugh
0fba70d5a8 [all] Rationalize annotation API 2016-06-01 17:37:01 -07:00
John Firebaugh
8985b1311b [core] Use geometry.hpp types for shape annotations 2016-06-01 17:36:50 -07:00
John Firebaugh
aa1a54c577 [core] Do annotation longitude wrapping together with latitude clamping 2016-06-01 17:36:50 -07:00
Minh Nguyễn
fcacbb87ef [core] Store feature keys in same order as in vector tile
The keys in the vector tile may not be in alphabetical order. Building a vector of keys by looping over std::map<std::string, …> effectively sorts the keys by alphabetical order without sorting the associated values. This change inserts keys in the same order in which they appear in the vector tile.
2016-06-01 12:07:53 -07:00
Bruno de Oliveira Abinader
31753583da [test] Added GL objects tests 2016-06-01 15:28:59 +03:00
Bruno de Oliveira Abinader
1b0683b94c [core] Use unique_resource for GL objects
Source: https://github.com/okdshin/unique_resource

These replace the complexity of manually handling moveable-RAII objects
with a type specific for that purpose.

As suggested in https://github.com/mapbox/mapbox-gl-native/pull/5141#issuecomment-221719872.
2016-06-01 13:53:39 +03:00
Bruno de Oliveira Abinader
2038a21cb5 [core] s/GLObjectStore/ObjectStore/ 2016-06-01 13:53:39 +03:00
Bruno de Oliveira Abinader
59f9a9f93c [core] Update sdf shader code
Ported the following patch:
- [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
2016-06-01 11:18:43 +03:00
Bruno de Oliveira Abinader
5e7736ce87 [core] Update icon shader code
Ported the following patch:
- [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
2016-06-01 11:18:18 +03:00
Young Hahn
a800d33dd8 [core] Don't earcut more than 500 inner rings 2016-05-31 10:15:18 -07:00
John Firebaugh
a475f1d813 [core] Run fixupPolygons on geojson-vt-cpp polygon output 2016-05-31 10:15:18 -07:00
John Firebaugh
25eec28588 [core] Fix up v1 vector tile geometries with clipper 2016-05-31 10:15:18 -07:00
John Firebaugh
58a9ca8042 [core] Run fix_members.sh on clipper code
https://github.com/mapnik/clipper/blob/r496-mapnik/cpp/fix_members.sh
2016-05-31 10:15:18 -07:00
John Firebaugh
f2427c8066 [core] Re-add clipper from https://github.com/mapnik/clipper/blob/r496-mapnik
Revision ac8d6bf2517f46c05647b5c19cac113fb180ffb4
2016-05-31 10:15:18 -07:00
John Firebaugh
faaafb8387 [core] Replace clipper and libtess with earcut.hpp 2016-05-31 10:15:18 -07:00
Bruno de Oliveira Abinader
cbfc84aff4 [core] Use init list for shader attributes
Shader parent object has been safely created, so it is safe to
initialize the *Shader attributes via initialization list.
2016-05-31 18:15:09 +03:00
Bruno de Oliveira Abinader
62b4dd554a [core] Update circle shader code
Ported the following patches:
 - [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
 - [Enabled data-driven styling for circle-radius](4356e41fa6)
 - [Reduce shader boilerplate, refactor "Bucket"](7d3da8f191)
2016-05-31 18:02:40 +03:00
Minh Nguyễn
de905ab64c [ios, osx] Holes in polygons
MGLPolygon (and by extension MGLMultiPolygon) now supports interior rings. The data is preserved in feature querying results, and interior rings are respected when adding polygon overlays to the map.

Fixes #1729.

[ios, osx] Updated changelog
2016-05-27 21:42:38 -07:00
Thiago Marcos P. Santos
9db75f1be3 [core] Fill the initial changeTimes with the reference timestamp of the first frame
On the Javascript implementation the array is automatically filled with
zeroes which is not the same thing as `TimePoint::min()`. Here we need
to get our own "zero" which is the timestamp of the first frame.

Fixes #5109
2016-05-27 23:30:12 +03:00
Konstantin Käfer
1b8d280e3f [core] refactor updateRenderables algorithm 2016-05-27 10:15:06 +02:00
Konstantin Käfer
ebff2234e4 [core] remove unused template definition 2016-05-27 10:15:02 +02:00
Minh Nguyễn
8ace0d37d1 [core] AnnotationTileLayer vends its own name (#5163)
Fixes #5159.
2016-05-26 13:12:23 -07:00
Bruno de Oliveira Abinader
c111250fcc [core] s/operator bool/created()/ in {GL,TexturePool}Holder
Prevents confusing usage of GL holder objects.
2016-05-26 19:36:52 +03:00
Bruno de Oliveira Abinader
b2b2797c2a [core] Move objectStore in {GL,TexturePool}Holder::reset()
Fixes an issue where a moved {GL,TexturePool}Holder would use an invalid
pointer when accessing 'objectStore'.

Fixes #5136.
2016-05-26 19:36:51 +03:00
John Firebaugh
172e645686 [core] Port "combine line-width and line-gap-width in shader"
a9559e911b
fcb9bcebae
2016-05-25 21:37:58 -07:00
John Firebaugh
c568a8ad77 [core] Port "separate u_opacity from u_color"
0d34125196
1f5afa7db0
2016-05-25 21:37:58 -07:00
John Firebaugh
45c5b2a66c [core] Share shaders with gl-js 2016-05-25 21:37:58 -07:00
John Firebaugh
672eb61079 [core] box_shader ⇢ collision_box_shader 2016-05-25 21:37:22 -07:00
John Firebaugh
30ec1c1fed [core] Remove unused dot shader 2016-05-25 21:37:22 -07:00
Konstantin Käfer
b4de5f472a [core] rename TileData::State to DataAvailability and make it private 2016-05-25 21:51:25 +02:00
Konstantin Käfer
6f1477f2d4 [core] split TileData::State::obsolete into its own thing 2016-05-25 21:51:25 +02:00
Konstantin Käfer
c91e4ee1f4 [core] normalize TileData::State::obsolete handling 2016-05-25 21:51:25 +02:00
Konstantin Käfer
c52a0c65f4 [core] remove TileData::State::loaded 2016-05-25 21:51:25 +02:00
Konstantin Käfer
95dc8ff3e1 [core] remove unused TileData::hasData() 2016-05-25 21:51:25 +02:00
Konstantin Käfer
d1ea695b96 [core] remove unused TileData::State::invalid 2016-05-25 21:51:25 +02:00
Konstantin Käfer
c60fd0604a [core] TileData::isReady() => TileData::isRenderable() 2016-05-25 21:51:25 +02:00
Konstantin Käfer
e2bcea90fc [core] use #pragma once instead of ifdef include guards 2016-05-25 21:35:37 +02:00
Bruno de Oliveira Abinader
1769e6fcb4 [core] Move GLFW stencil clip debug to core
This makes the stencil clip debug available to all platforms.

Fixes #4669.
2016-05-24 19:58:24 +03:00
Bruno de Oliveira Abinader
876bf0687a [core] Added PixelZoom, RasterPos to GL config 2016-05-24 19:58:24 +03:00
Konstantin Käfer
7272d7c84c [core] move *Observers to their own files 2016-05-23 18:04:31 +02:00
Konstantin Käfer
b9f23661f8 [core] move RenderItem and GlyphRange to their own headers 2016-05-23 18:04:31 +02:00
Thiago Marcos P. Santos
7b4f5b86af [core] Restore default texture unit
Play nice with the GL context when we are sharing it.
2016-05-23 18:50:34 +03:00
Bruno de Oliveira Abinader
7143408f69 [core] Implement MapDebugOptions::Wireframe
Together with MapDebugOptions::Collision, provides "wireframe" rendering
output so all drawn objects are visible. This mode ignores the line
width, background and fill colors for better visualization.

Fixes #4359.
2016-05-23 11:50:05 +03:00
Ansis Brammanis
4c62a5508c [core] better symbol fading with texture lookups (#4579)
- this is simpler than predicting opacity based on current zooming speed
- this is smoother: symbols don't flicker when changing zoom speed or
  when zooming in and out rapidly.

1df1466270

fix #4562
2016-05-20 12:19:56 -07:00