Commit Graph

2757 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
623a124e01 [core] Use query geometry from FeatureIndex into CollisionTile::queryRenderedSymbols 2016-10-11 12:10:32 +03:00
John Firebaugh
38e78e25df [core] No need for feature querying to support multipolygons 2016-10-11 10:54:58 +03:00
Bruno de Oliveira Abinader
efc1bff65f [core] Ignore placement for symbol annotations 2016-10-11 09:55:32 +03:00
Bruno de Oliveira Abinader
22b7436acf [core] Skip placement scale for features that ignore placement 2016-10-11 09:55:32 +03:00
John Firebaugh
5891c7028d Update mapbox-gl-shaders to 98a56d 2016-10-10 12:46:52 -07:00
Bruno de Oliveira Abinader
3b8b68d028 [core] Fix Map::setLatLng behavior
We were erroneously assigning a value to optional<ScreenCoordinate>
(null island), causing it to be a valid anchor for Transform::easeTo.
2016-10-07 17:23:17 +03:00
John Firebaugh
21d7ee11e1 [core] Rationalize shader names
{layer type}{subtype}Shader
2016-10-06 14:47:58 -07:00
John Firebaugh
f438bb68b0 [core] Adhere to vertices/vertexBuffer naming convention 2016-10-05 10:52:19 -07:00
John Firebaugh
da4527cd3a [core] TextureRectVertex ⇢ SymbolVertex 2016-10-05 10:52:19 -07:00
John Firebaugh
9cf57e7142 [core] Make ElementGroup safer
Template on shader types, rather than count. This allows the compiler to enforce using the correct VAO for the shader and PaintMode. This fixes OverdrawMode with circle layers.

While here, avoid using unique_ptrs for groups. Instead, ensure ElementGroup is movable.
2016-10-05 10:52:19 -07:00
John Firebaugh
e4310aa874 [core] Improve attribute binding API 2016-10-05 10:52:19 -07:00
John Firebaugh
b9b8657d43 [core] Put VertexArrayObject in gl namespace 2016-10-05 10:52:19 -07:00
John Firebaugh
73334ac8fa [core] Move shader and uniform to gl directory 2016-10-05 10:52:19 -07:00
John Firebaugh
7a3bef091e [core] Refactor Buffer 2016-10-05 10:52:19 -07:00
John Firebaugh
ac8a74ebcc [core] Don't refer to geometry coordinates as "vertices" 2016-10-05 10:52:19 -07:00
John Firebaugh
31be5d3c3a [core] Tiles that error on load are not renderable 2016-10-05 10:26:04 -07:00
Thiago Marcos P. Santos
dd604a7b36 [core] Pre-filter sources based on the layers they contain 2016-10-05 11:12:16 +03:00
Konstantin Käfer
07315711d6 [core] remove Raster object in favor of a more low-level Texture object 2016-10-04 14:00:30 -07:00
Sam Matthews
280fd8c28e [core] Preserve non-access_token query parameters in canonicalizeTileURL 2016-10-03 10:08:17 -07:00
Konstantin Käfer
b470a65582 [build] add back -Werror 2016-09-30 17:01:05 +02:00
Ivo van Dongen
1bf12e20a6 [core] LocalFileSource implementation and tests 2016-09-30 14:57:26 +02:00
Konstantin Käfer
8c4da72d09 [core] only load debug extensions in debug mode 2016-09-29 13:19:27 -07:00
Konstantin Käfer
2ec2860ce5 [core] move OpenGL extension loading to their own headers 2016-09-29 13:19:27 -07:00
Konstantin Käfer
cc78b74098 [core] remove dependence on gl.h types 2016-09-29 10:17:47 -07:00
Konstantin Käfer
15aece8a30 [core] introduces types for GL objects 2016-09-29 10:17:47 -07:00
Konstantin Käfer
d1a84d9b51 [core] rename VAO => VertexArray, FBO => Framebuffer 2016-09-29 10:17:47 -07:00
Konstantin Käfer
1777b8757a [core] don't iterate over references to uint32_t 2016-09-28 19:03:03 +02:00
Konstantin Käfer
068732fc9e [core] don't iterate too much over program objects scheduled for deletion 2016-09-28 19:03:03 +02:00
Thiago Marcos P. Santos
4ef66f36d4 [core] Use geojson as a header only library 2016-09-28 16:35:50 +02:00
Konstantin Käfer
a8b007daa0 [core] remove unused GL_TRACK functions 2016-09-28 16:34:07 +02:00
John Firebaugh
aa0fc68fea [core] Mark tracked state as dirty when the tracked object is destroyed 2016-09-28 10:54:48 +02:00
Konstantin Käfer
44c7e9d05e [core] merge gl::ObjectStore into gl::Context 2016-09-27 11:03:29 -07:00
Konstantin Käfer
ce42d22984 [core] rename gl::Config to gl::Context 2016-09-27 11:03:29 -07:00
Konstantin Käfer
21386b3146 [core] move GL value accessors to gl::value namespace 2016-09-27 11:03:29 -07:00
Konstantin Käfer
c88ce2d51e [core] add ability to render to offscreen textures 2016-09-27 10:42:10 +02:00
Konstantin Käfer
68ec9d3fd5 [core] Make sure textures have a scaling filter set after upload 2016-09-27 10:42:10 +02:00
Konstantin Käfer
63e53de157 [core] standardize on uint16_t for texture sizes 2016-09-27 10:42:10 +02:00
Konstantin Käfer
512037cfdc [core] Allow retrieving texture ID and size 2016-09-27 10:42:10 +02:00
Konstantin Käfer
ffa8a7668b [core] store viewport and FBO binding 2016-09-27 10:42:10 +02:00
Minh Nguyễn
0f5b194617 [core, qt] Generalized source change notification
This same notification can in the future be used for other changes to a source.
2016-09-26 15:43:01 -07:00
Minh Nguyễn
7ff036cd01 [core] Removed map attribution API
Since client code can readily access the individual sources, Map doesn’t need to expose a dedicated API for iterating over them.
2016-09-26 15:42:57 -07:00
John Firebaugh
a9842dbd6b [core] Extract some GlyphRange-related constants 2016-09-26 14:55:49 -07:00
Minh Nguyễn
f307652548 [core] Source-driven attribution
Implemented observer callbacks so the style knows when the source’s attribution changes and the map knows when the style’s attribution changes. Also implemented a getter for a tile source’s attribution.

Fixes #2723.
2016-09-26 11:37:06 -07:00
Thiago Marcos P. Santos
78af55f30a [core] Fix initialization race on util::mapbox::isMapboxURL (#6455)
This function can be called from different threads and was depending
on a global `std::string protocol` which can do heap allocations.

The first thread to use it would initialized it which is not exactly
safe, so this patch moves it to a `char *` that is just a pointer to
the data segment, so no races.

Valgrind detected it on #6431.

```
==9874== Conditional jump or move depends on uninitialised value(s)
==9874==    at 0x4C307C2: __memcmp_sse4_1 (in /home/travis/build/mapbox/mapbox-gl-native/mason_packages/linux-x86_64/valgrind/latest/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9874==    by 0x79896E: mbgl::util::mapbox::isMapboxURL(std::string const&) (in /home/travis/build/mapbox/mapbox-gl-native/build/qt-linux-x86_64/Release/mbgl-test)
==9874==    by 0x6DC756: mbgl::style::TileSourceImpl::parseTileJSON(std::string const&, std::string const&, mbgl::SourceType, unsigned short) (in /home/travis/build/mapbox/mapbox-gl-native/build/qt-linux-x86_64/Release/mbgl-test)
==9874==    by 0x6DDA6A: std::_Function_handler<void (mbgl::Response), mbgl::style::TileSourceImpl::loadDescription(mbgl::FileSource&)::{lambda(mbgl::Response)#1}>::_M_invoke(std::_Any_data const&, mbgl::Response&&) (in /home/travis/build/mapbox/mapbox-gl-native/build/qt-linux-x86_64/Release/mbgl-test)
==9874==    by 0x50BE80: std::_Function_handler<void (), mbgl::StubFileSource::StubFileSource()::{lambda()#1}>::_M_invoke(std::_Any_data const&) (in /home/travis/build/mapbox/mapbox-gl-native/build/qt-linux-x86_64/Release/mbgl-test)
==9874==    by 0x70972A5: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
==9874==    by 0x70A3621: QTimer::timerEvent(QTimerEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
==9874==    by 0x7098053: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
==9874==    by 0x60CCC8B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
==9874==    by 0x60D1E55: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
==9874==    by 0x706FC2C: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
==9874==    by 0x70BC1AC: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
==9874==
```
2016-09-26 20:43:06 +03:00
Bruno de Oliveira Abinader
2ed81bbaae [core] Trigger Update::RecalculateStyle when toggling layer visibility 2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
ae3a02babe [core] Reuse Map::update() 2016-09-26 11:47:34 +02:00
Konstantin Käfer
afb93d4d3a [core] track VAOs and Buffers 2016-09-26 11:14:40 +02:00
Konstantin Käfer
adcb449ff3 [core] make GL value defaults constexpr 2016-09-26 11:14:40 +02:00
Ivo van Dongen
c4420d081c [core] ensure network::Reachable is called only once 2016-09-23 10:47:55 +02:00
Young Hahn
08c08f6705 [core] Don't use depth test unless text is pitch-aligned to map (#6404)
* [core, ios, android] Use `auto` value for properties with calculated defaults

* Fix render tests

* [core] Don't use depth test unless text is pitch-aligned to map.

* Bump mapbox-gl-test-suite

* TransformState pitch is already in radians

* Reduce setDepthSublayer calls

* Bump test suite
2016-09-22 19:51:41 -04:00