`QColor::name()` produces `#rrggbb` format where alpha is missing.
Use `rgba(...)` string instead when convert `QColor` to mapbox style.
Note: `QColor::name(QColor::HexArgb)` produces `#aarrggbb` format string,
but mapbox does not support this format apparently.
This patch will make Mapbox GL Core never use OpenGL
directly. We should consider locking into OpenGL ES 2.0
to simplify the code path and remove #ifdefs.
These loaders will provide pointers to the platform implementation
of OpenGL. On Android, Linux and Darwin, we simply link with the
OpenGL implementation that is expected to exist on the platform.
Qt has its own GL loader, so we just connect the dots.
There are 3 methods in QMapboxGL which can be static method.
QMapboxGL::metersPerPixelAtLatitude
QMapboxGL::projectedMetersForCoordinate
QMapboxGL::coordinateForProjectedMeters
Add these functions into QMapbox namespace as global functions.
The methods in QMapboxGL are kept for backward compatibility.
When opening many maps and sharing the same filesource:
- Say we open around 30 maps and they all have the same style.
- They will all request the same sprite.json, but Qt filesource will
restrict simultaneous request to 20.
- Mapbox GL will send some sprite.json to the filesource and queue
some internally along with other requests.
- When the first sprite.json arrives and the Qt filesource calls the
callback, Mapbox GL will synchronously push queued requests to the
Qt filesource when a request is handled.
- We are walking a QVector dispatching sprite.json requests, but more
requests get added to this QVector while we are walking it using an
iterator.
- That corrupts the iterator and we get a crash.
The fix is simple, just pop items from the QVector until it is empty
instead of using iterators.
Vendorize the submodules and a simple CMake build
system for all them. The dependencies will inherit
compilation options for core.
The goal is to make Mapbox GL Core completely self
contained with a simple offline build.
The `style::Layer` class now exposes all the properties contained at `style::LayerImpl`.
This allowed to drop `style::Layer::accept()` method usage, avoid the repeated generated code
and thus save some binary size.
This patch is a part of the layers modularization effort.