rename llmr => mbgl

This commit is contained in:
Konstantin Käfer
2014-07-16 18:53:56 -07:00
parent c1a64dc5fa
commit 4ea281c750
236 changed files with 1199 additions and 1198 deletions

View File

@@ -1,11 +1,11 @@
#include <llmr/geometry/debug_font_buffer.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/geometry/debug_font_buffer.hpp>
#include <mbgl/platform/gl.hpp>
#include <cmath>
#include <cstring>
#include "debug_font.cpp"
using namespace llmr;
using namespace mbgl;
void DebugFontBuffer::addText(const char *text, double left, double baseline, double scale) {
uint16_t *coords = nullptr;

View File

@@ -1,6 +1,6 @@
#include <llmr/geometry/elements_buffer.hpp>
#include <mbgl/geometry/elements_buffer.hpp>
using namespace llmr;
using namespace mbgl;
void TriangleElementsBuffer::add(element_type a, element_type b, element_type c) {
element_type *elements = static_cast<element_type *>(addElement());

View File

@@ -1,9 +1,9 @@
#include <llmr/geometry/fill_buffer.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/geometry/fill_buffer.hpp>
#include <mbgl/platform/gl.hpp>
#include <climits>
using namespace llmr;
using namespace mbgl;
void FillVertexBuffer::add(vertex_type x, vertex_type y) {
vertex_type *vertices = static_cast<vertex_type *>(addElement());

View File

@@ -1,13 +1,13 @@
#include <llmr/geometry/glyph_atlas.hpp>
#include <llmr/map/vector_tile.hpp>
#include <llmr/platform/gl.hpp>
#include <llmr/platform/platform.hpp>
#include <mbgl/geometry/glyph_atlas.hpp>
#include <mbgl/map/vector_tile.hpp>
#include <mbgl/platform/gl.hpp>
#include <mbgl/platform/platform.hpp>
#include <cassert>
#include <algorithm>
using namespace llmr;
using namespace mbgl;
GlyphAtlas::GlyphAtlas(uint16_t width, uint16_t height)
: width(width),

View File

@@ -1,9 +1,9 @@
#include <llmr/geometry/icon_buffer.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/geometry/icon_buffer.hpp>
#include <mbgl/platform/gl.hpp>
#include <cmath>
using namespace llmr;
using namespace mbgl;
void IconVertexBuffer::add(vertex_type x, vertex_type y, uint16_t tx, uint16_t ty) {
void *data = addElement();

View File

@@ -1,6 +1,6 @@
#include <llmr/geometry/interpolate.hpp>
#include <mbgl/geometry/interpolate.hpp>
namespace llmr {
namespace mbgl {
Anchors interpolate(const std::vector<Coordinate> &vertices, float spacing,
float minScale, int start) {

View File

@@ -1,9 +1,9 @@
#include <llmr/geometry/line_buffer.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/geometry/line_buffer.hpp>
#include <mbgl/platform/gl.hpp>
#include <cmath>
using namespace llmr;
using namespace mbgl;
size_t LineVertexBuffer::add(vertex_type x, vertex_type y, float ex, float ey, int8_t tx, int8_t ty, int32_t linesofar) {
size_t idx = index();

View File

@@ -1,18 +1,18 @@
#include <llmr/geometry/sprite_atlas.hpp>
#include <llmr/platform/gl.hpp>
#include <llmr/platform/platform.hpp>
#include <llmr/util/math.hpp>
#include <llmr/util/std.hpp>
#include <llmr/util/constants.hpp>
#include <mbgl/geometry/sprite_atlas.hpp>
#include <mbgl/platform/gl.hpp>
#include <mbgl/platform/platform.hpp>
#include <mbgl/util/math.hpp>
#include <mbgl/util/std.hpp>
#include <mbgl/util/constants.hpp>
#include <llmr/map/sprite.hpp>
#include <mbgl/map/sprite.hpp>
#include <cassert>
#include <cmath>
#include <algorithm>
using namespace llmr;
using namespace mbgl;
SpriteAtlas::SpriteAtlas(dimension width, dimension height)
: width(width),

View File

@@ -1,10 +1,10 @@
#include <llmr/geometry/text_buffer.hpp>
#include <llmr/platform/gl.hpp>
#include <llmr/util/math.hpp>
#include <mbgl/geometry/text_buffer.hpp>
#include <mbgl/platform/gl.hpp>
#include <mbgl/util/math.hpp>
#include <cmath>
using namespace llmr;
using namespace mbgl;
const double TextVertexBuffer::angleFactor = 128.0 / M_PI;

View File

@@ -1,7 +1,7 @@
#include <llmr/geometry/vertex_buffer.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/geometry/vertex_buffer.hpp>
#include <mbgl/platform/gl.hpp>
using namespace llmr;
using namespace mbgl;
VertexBuffer::VertexBuffer(std::initializer_list<int16_t> init) : array(init) {}

View File

@@ -1,24 +1,24 @@
#include <llmr/map/map.hpp>
#include <llmr/map/source.hpp>
#include <llmr/platform/platform.hpp>
#include <llmr/map/sprite.hpp>
#include <llmr/util/transition.hpp>
#include <llmr/util/time.hpp>
#include <llmr/util/math.hpp>
#include <llmr/util/clip_ids.hpp>
#include <llmr/util/string.hpp>
#include <llmr/util/constants.hpp>
#include <llmr/util/uv.hpp>
#include <llmr/util/std.hpp>
#include <llmr/style/style_layer_group.hpp>
#include <llmr/style/style_bucket.hpp>
#include <llmr/geometry/sprite_atlas.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/map/source.hpp>
#include <mbgl/platform/platform.hpp>
#include <mbgl/map/sprite.hpp>
#include <mbgl/util/transition.hpp>
#include <mbgl/util/time.hpp>
#include <mbgl/util/math.hpp>
#include <mbgl/util/clip_ids.hpp>
#include <mbgl/util/string.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/uv.hpp>
#include <mbgl/util/std.hpp>
#include <mbgl/style/style_layer_group.hpp>
#include <mbgl/style/style_bucket.hpp>
#include <mbgl/geometry/sprite_atlas.hpp>
#include <algorithm>
#include <memory>
#include <iostream>
using namespace llmr;
using namespace mbgl;
Map::Map(View& view)
: view(view),

View File

@@ -1,8 +1,8 @@
#include <llmr/map/map.hpp>
#include <llmr/map/raster_tile_data.hpp>
#include <llmr/style/style.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/map/raster_tile_data.hpp>
#include <mbgl/style/style.hpp>
using namespace llmr;
using namespace mbgl;
RasterTileData::RasterTileData(Tile::ID id, Map &map, const std::string url)

View File

@@ -1,22 +1,22 @@
#include <llmr/map/source.hpp>
#include <llmr/map/map.hpp>
#include <llmr/map/transform.hpp>
#include <llmr/renderer/painter.hpp>
#include <llmr/util/constants.hpp>
#include <llmr/util/raster.hpp>
#include <llmr/util/string.hpp>
#include <llmr/util/texturepool.hpp>
#include <llmr/util/vec.hpp>
#include <llmr/util/token.hpp>
#include <llmr/util/std.hpp>
#include <llmr/geometry/glyph_atlas.hpp>
#include <llmr/style/style_layer.hpp>
#include <mbgl/map/source.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/map/transform.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/raster.hpp>
#include <mbgl/util/string.hpp>
#include <mbgl/util/texturepool.hpp>
#include <mbgl/util/vec.hpp>
#include <mbgl/util/token.hpp>
#include <mbgl/util/std.hpp>
#include <mbgl/geometry/glyph_atlas.hpp>
#include <mbgl/style/style_layer.hpp>
#include <llmr/map/vector_tile_data.hpp>
#include <llmr/map/raster_tile_data.hpp>
#include <mbgl/map/vector_tile_data.hpp>
#include <mbgl/map/raster_tile_data.hpp>
namespace llmr {
namespace mbgl {
Source::Source(StyleSource style_source, const std::string &access_token)
: type(style_source.type),
@@ -330,7 +330,7 @@ struct edge {
typedef const std::function<void(int32_t, int32_t, int32_t, int32_t)> ScanLine;
// scan-line conversion
edge _edge(const llmr::vec2<double> a, const llmr::vec2<double> b) {
edge _edge(const mbgl::vec2<double> a, const mbgl::vec2<double> b) {
if (a.y > b.y) {
return { b.x, b.y, a.x, a.y, a.x - b.x, a.y - b.y };
} else {
@@ -363,7 +363,7 @@ void _scanSpans(edge e0, edge e1, int32_t ymin, int32_t ymax, ScanLine scanLine)
}
// scan-line conversion
void _scanTriangle(const llmr::vec2<double> a, const llmr::vec2<double> b, const llmr::vec2<double> c, int32_t ymin, int32_t ymax, ScanLine& scanLine) {
void _scanTriangle(const mbgl::vec2<double> a, const mbgl::vec2<double> b, const mbgl::vec2<double> c, int32_t ymin, int32_t ymax, ScanLine& scanLine) {
edge ab = _edge(a, b);
edge bc = _edge(b, c);
edge ca = _edge(c, a);
@@ -384,9 +384,9 @@ double Source::getZoom(const TransformState &state) const {
return state.getZoom() + offset;
}
std::forward_list<llmr::Tile::ID> Source::covering_tiles(const TransformState &state, int32_t clamped_zoom, const box& points) {
std::forward_list<mbgl::Tile::ID> Source::covering_tiles(const TransformState &state, int32_t clamped_zoom, const box& points) {
int32_t dim = std::pow(2, clamped_zoom);
std::forward_list<llmr::Tile::ID> tiles;
std::forward_list<mbgl::Tile::ID> tiles;
bool is_raster = (type == SourceType::Raster);
double search_zoom = getZoom(state);

View File

@@ -1,16 +1,16 @@
#include <llmr/map/sprite.hpp>
#include <llmr/map/map.hpp>
#include <llmr/util/raster.hpp>
#include <llmr/platform/log.hpp>
#include <mbgl/map/sprite.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/util/raster.hpp>
#include <mbgl/platform/log.hpp>
#include <string>
#include <llmr/platform/platform.hpp>
#include <llmr/util/uv.hpp>
#include <llmr/util/std.hpp>
#include <mbgl/platform/platform.hpp>
#include <mbgl/util/uv.hpp>
#include <mbgl/util/std.hpp>
#include <rapidjson/document.h>
using namespace llmr;
using namespace mbgl;
SpritePosition::SpritePosition(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t pixelRatio)
: x(x),

View File

@@ -1,8 +1,8 @@
#include <llmr/map/tile.hpp>
#include <mbgl/map/tile.hpp>
#include <cassert>
using namespace llmr;
using namespace mbgl;
#include <iostream>

View File

@@ -1,9 +1,9 @@
#include <llmr/map/tile_data.hpp>
#include <llmr/map/map.hpp>
#include <mbgl/map/tile_data.hpp>
#include <mbgl/map/map.hpp>
#include <llmr/util/string.hpp>
#include <mbgl/util/string.hpp>
using namespace llmr;
using namespace mbgl;
TileData::TileData(Tile::ID id, Map &map, const std::string url)
: id(id),

View File

@@ -1,23 +1,23 @@
#include <llmr/map/tile_parser.hpp>
#include <mbgl/map/tile_parser.hpp>
#include <llmr/map/vector_tile_data.hpp>
#include <llmr/style/style.hpp>
#include <llmr/style/style_layer.hpp>
#include <llmr/style/style_layer_group.hpp>
#include <llmr/renderer/fill_bucket.hpp>
#include <llmr/renderer/line_bucket.hpp>
#include <llmr/renderer/icon_bucket.hpp>
#include <llmr/renderer/text_bucket.hpp>
#include <llmr/renderer/raster_bucket.hpp>
#include <llmr/util/raster.hpp>
#include <llmr/util/constants.hpp>
#include <llmr/util/token.hpp>
#include <llmr/geometry/glyph_atlas.hpp>
#include <llmr/text/glyph_store.hpp>
#include <llmr/text/glyph.hpp>
#include <mbgl/map/vector_tile_data.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/style/style_layer_group.hpp>
#include <mbgl/renderer/fill_bucket.hpp>
#include <mbgl/renderer/line_bucket.hpp>
#include <mbgl/renderer/icon_bucket.hpp>
#include <mbgl/renderer/text_bucket.hpp>
#include <mbgl/renderer/raster_bucket.hpp>
#include <mbgl/util/raster.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/token.hpp>
#include <mbgl/geometry/glyph_atlas.hpp>
#include <mbgl/text/glyph_store.hpp>
#include <mbgl/text/glyph.hpp>
#include <llmr/util/std.hpp>
#include <llmr/util/utf.hpp>
#include <mbgl/util/std.hpp>
#include <mbgl/util/utf.hpp>
#include <locale>
@@ -29,7 +29,7 @@ namespace regex_impl = boost;
namespace regex_impl = std;
#endif
using namespace llmr;
using namespace mbgl;
TileParser::TileParser(const std::string &data, VectorTileData &tile,
const std::shared_ptr<const Style> &style,

View File

@@ -1,13 +1,13 @@
#include <llmr/map/transform.hpp>
#include <llmr/util/constants.hpp>
#include <llmr/util/mat4.hpp>
#include <llmr/util/std.hpp>
#include <llmr/util/math.hpp>
#include <llmr/util/time.hpp>
#include <llmr/platform/platform.hpp>
#include <mbgl/map/transform.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/mat4.hpp>
#include <mbgl/util/std.hpp>
#include <mbgl/util/math.hpp>
#include <mbgl/util/time.hpp>
#include <mbgl/platform/platform.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
const double D2R = M_PI / 180.0;
const double R2D = 180.0 / M_PI;

View File

@@ -1,7 +1,7 @@
#include <llmr/map/transform_state.hpp>
#include <llmr/util/constants.hpp>
#include <mbgl/map/transform_state.hpp>
#include <mbgl/util/constants.hpp>
using namespace llmr;
using namespace mbgl;
#pragma mark - Matrix

View File

@@ -1,14 +1,14 @@
#include <llmr/map/vector_tile.hpp>
#include <llmr/style/filter_expression_private.hpp>
#include <llmr/style/filter_comparison_private.hpp>
#include <mbgl/map/vector_tile.hpp>
#include <mbgl/style/filter_expression_private.hpp>
#include <mbgl/style/filter_comparison_private.hpp>
#include <algorithm>
#include <iostream>
using namespace llmr;
using namespace mbgl;
std::ostream& llmr::operator<<(std::ostream& os, const FeatureType& type) {
std::ostream& mbgl::operator<<(std::ostream& os, const FeatureType& type) {
switch (type) {
case FeatureType::Unknown: return os << "Unknown";
case FeatureType::Point: return os << "Point";
@@ -54,7 +54,7 @@ VectorTileFeature::VectorTileFeature(pbf feature, const VectorTileLayer& layer)
}
std::ostream& llmr::operator<<(std::ostream& os, const VectorTileFeature& feature) {
std::ostream& mbgl::operator<<(std::ostream& os, const VectorTileFeature& feature) {
os << "Feature(" << feature.id << "): " << feature.type << std::endl;
for (const auto& prop : feature.properties) {
os << " - " << prop.first << ": " << prop.second << std::endl;

View File

@@ -1,10 +1,10 @@
#include <llmr/map/vector_tile_data.hpp>
#include <llmr/util/std.hpp>
#include <llmr/map/map.hpp>
#include <llmr/style/style_layer.hpp>
#include <llmr/style/style_bucket.hpp>
#include <mbgl/map/vector_tile_data.hpp>
#include <mbgl/util/std.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/style/style_bucket.hpp>
using namespace llmr;
using namespace mbgl;
VectorTileData::VectorTileData(Tile::ID id, Map &map, const std::string url)
: TileData(id, map, url) {

View File

@@ -1,4 +1,4 @@
#include <llmr/platform/gl.hpp>
#include <mbgl/platform/gl.hpp>
#include <iostream>

View File

@@ -1,6 +1,6 @@
#include <llmr/platform/log.hpp>
#include <mbgl/platform/log.hpp>
namespace llmr {
namespace mbgl {
std::unique_ptr<LogBackend> Log::Backend;

View File

@@ -1,9 +1,9 @@
#include <llmr/platform/request.hpp>
#include <llmr/platform/platform.hpp>
#include <llmr/util/std.hpp>
#include <llmr/util/uv.hpp>
#include <mbgl/platform/request.hpp>
#include <mbgl/platform/platform.hpp>
#include <mbgl/util/std.hpp>
#include <mbgl/util/uv.hpp>
using namespace llmr::platform;
using namespace mbgl::platform;
Request::Request(const std::string &url,
std::function<void(Response *)> callback,

View File

@@ -1,14 +1,14 @@
#include <llmr/renderer/debug_bucket.hpp>
#include <mbgl/renderer/debug_bucket.hpp>
#include <llmr/renderer/painter.hpp>
#include <mbgl/renderer/painter.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/platform/gl.hpp>
#include <cassert>
struct geometry_too_long_exception : std::exception {};
using namespace llmr;
using namespace mbgl;
DebugBucket::DebugBucket(DebugFontBuffer& fontBuffer)
: fontBuffer(fontBuffer) {

View File

@@ -1,20 +1,20 @@
#include <llmr/renderer/fill_bucket.hpp>
#include <llmr/geometry/fill_buffer.hpp>
#include <llmr/geometry/elements_buffer.hpp>
#include <llmr/geometry/geometry.hpp>
#include <mbgl/renderer/fill_bucket.hpp>
#include <mbgl/geometry/fill_buffer.hpp>
#include <mbgl/geometry/elements_buffer.hpp>
#include <mbgl/geometry/geometry.hpp>
#include <llmr/renderer/painter.hpp>
#include <llmr/style/style.hpp>
#include <llmr/map/vector_tile.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/map/vector_tile.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/platform/gl.hpp>
#include <cassert>
struct geometry_too_long_exception : std::exception {};
using namespace llmr;
using namespace mbgl;

View File

@@ -1,6 +1,6 @@
#include <llmr/renderer/frame_history.hpp>
#include <mbgl/renderer/frame_history.hpp>
using namespace llmr;
using namespace mbgl;
// Record frame history that will be used to calculate fading params
void FrameHistory::record(timestamp now, float zoom) {

View File

@@ -1,23 +1,23 @@
#include <llmr/renderer/icon_bucket.hpp>
#include <llmr/geometry/icon_buffer.hpp>
#include <llmr/geometry/elements_buffer.hpp>
#include <llmr/geometry/geometry.hpp>
#include <llmr/geometry/sprite_atlas.hpp>
#include <mbgl/renderer/icon_bucket.hpp>
#include <mbgl/geometry/icon_buffer.hpp>
#include <mbgl/geometry/elements_buffer.hpp>
#include <mbgl/geometry/geometry.hpp>
#include <mbgl/geometry/sprite_atlas.hpp>
#include <llmr/renderer/painter.hpp>
#include <llmr/style/style.hpp>
#include <llmr/map/sprite.hpp>
#include <llmr/map/vector_tile.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/map/sprite.hpp>
#include <mbgl/map/vector_tile.hpp>
#include <llmr/platform/gl.hpp>
#include <llmr/util/constants.hpp>
#include <llmr/util/token.hpp>
#include <mbgl/platform/gl.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/token.hpp>
#include <cassert>
struct geometry_too_long_exception : std::exception {};
using namespace llmr;
using namespace mbgl;
IconBucket::IconBucket(IconVertexBuffer& vertexBuffer,
const StyleBucketIcon& properties)

View File

@@ -1,13 +1,13 @@
#include <llmr/renderer/line_bucket.hpp>
#include <llmr/geometry/elements_buffer.hpp>
#include <llmr/geometry/geometry.hpp>
#include <mbgl/renderer/line_bucket.hpp>
#include <mbgl/geometry/elements_buffer.hpp>
#include <mbgl/geometry/geometry.hpp>
#include <llmr/renderer/painter.hpp>
#include <llmr/style/style.hpp>
#include <llmr/map/vector_tile.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/map/vector_tile.hpp>
#include <llmr/util/math.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/util/math.hpp>
#include <mbgl/platform/gl.hpp>
#define BUFFER_OFFSET(i) ((char *)nullptr + (i))
@@ -15,7 +15,7 @@
struct geometry_too_long_exception : std::exception {};
using namespace llmr;
using namespace mbgl;
LineBucket::LineBucket(LineVertexBuffer& vertexBuffer,
TriangleElementsBuffer& triangleElementsBuffer,

View File

@@ -1,19 +1,19 @@
#include <llmr/renderer/painter.hpp>
#include <llmr/map/map.hpp>
#include <llmr/style/style_layer.hpp>
#include <llmr/util/std.hpp>
#include <llmr/util/string.hpp>
#include <llmr/util/time.hpp>
#include <llmr/util/clip_ids.hpp>
#include <llmr/util/constants.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/util/std.hpp>
#include <mbgl/util/string.hpp>
#include <mbgl/util/time.hpp>
#include <mbgl/util/clip_ids.hpp>
#include <mbgl/util/constants.hpp>
#if defined(DEBUG)
#include <llmr/util/timer.hpp>
#include <mbgl/util/timer.hpp>
#endif
#include <cassert>
#include <algorithm>
using namespace llmr;
using namespace mbgl;
#define BUFFER_OFFSET(i) ((char *)nullptr + (i))

View File

@@ -1,10 +1,10 @@
#include <llmr/renderer/painter.hpp>
#include <llmr/renderer/fill_bucket.hpp>
#include <llmr/map/map.hpp>
#include <llmr/map/source.hpp>
#include <llmr/util/clip_ids.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/renderer/fill_bucket.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/map/source.hpp>
#include <mbgl/util/clip_ids.hpp>
using namespace llmr;
using namespace mbgl;
void Painter::drawClippingMasks(const std::set<std::shared_ptr<StyleSource>> &sources) {
gl::group group("clipping masks");

View File

@@ -1,9 +1,9 @@
#include <llmr/renderer/painter.hpp>
#include <llmr/style/style_properties.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/style/style_properties.hpp>
#include <iostream>
using namespace llmr;
using namespace mbgl;
void Painter::drawComposite(GLuint texture, const CompositeProperties &properties) {
// We're doing full-screen framebuffer blending, so no need to do stencil testing here.

View File

@@ -1,9 +1,9 @@
#include <llmr/renderer/painter.hpp>
#include <llmr/renderer/debug_bucket.hpp>
#include <llmr/map/map.hpp>
#include <llmr/util/string.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/renderer/debug_bucket.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/util/string.hpp>
using namespace llmr;
using namespace mbgl;
void Painter::renderTileDebug(const Tile& tile) {
gl::group group(util::sprintf<32>("debug %d/%d/%d", tile.id.z, tile.id.y, tile.id.z));

View File

@@ -1,12 +1,12 @@
#include <llmr/renderer/painter.hpp>
#include <llmr/renderer/fill_bucket.hpp>
#include <llmr/style/style_layer.hpp>
#include <llmr/map/map.hpp>
#include <llmr/map/sprite.hpp>
#include <llmr/geometry/sprite_atlas.hpp>
#include <llmr/util/std.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/renderer/fill_bucket.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/map/sprite.hpp>
#include <mbgl/geometry/sprite_atlas.hpp>
#include <mbgl/util/std.hpp>
using namespace llmr;
using namespace mbgl;

View File

@@ -1,9 +1,9 @@
#include <llmr/renderer/painter.hpp>
#include <llmr/renderer/fill_bucket.hpp>
#include <llmr/map/map.hpp>
#include <llmr/util/clip_ids.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/renderer/fill_bucket.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/util/clip_ids.hpp>
using namespace llmr;
using namespace mbgl;
void Painter::clearFramebuffers() {

View File

@@ -1,12 +1,12 @@
#include <llmr/renderer/painter.hpp>
#include <llmr/renderer/icon_bucket.hpp>
#include <llmr/map/map.hpp>
#include <llmr/map/sprite.hpp>
#include <llmr/style/style_layer.hpp>
#include <llmr/geometry/sprite_atlas.hpp>
#include <llmr/util/math.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/renderer/icon_bucket.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/map/sprite.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/geometry/sprite_atlas.hpp>
#include <mbgl/util/math.hpp>
using namespace llmr;
using namespace mbgl;
void Painter::renderIcon(IconBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id) {
// Abort early.

View File

@@ -1,9 +1,9 @@
#include <llmr/renderer/painter.hpp>
#include <llmr/renderer/line_bucket.hpp>
#include <llmr/style/style_layer.hpp>
#include <llmr/map/map.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/renderer/line_bucket.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/map/map.hpp>
using namespace llmr;
using namespace mbgl;
void Painter::renderLine(LineBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id) {
// Abort early.

View File

@@ -1,7 +1,7 @@
#include <llmr/renderer/painter.hpp>
#include <llmr/style/style_properties.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/style/style_properties.hpp>
using namespace llmr;
using namespace mbgl;
void Painter::preparePrerender(PrerenderedTexture &texture) {
glDisable(GL_DEPTH_TEST);

View File

@@ -1,9 +1,9 @@
#include <llmr/renderer/painter.hpp>
#include <llmr/renderer/raster_bucket.hpp>
#include <llmr/style/style_layer.hpp>
#include <llmr/map/map.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/renderer/raster_bucket.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/map/map.hpp>
using namespace llmr;
using namespace mbgl;
void Painter::renderRaster(RasterBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& /*id*/) {
if (pass == Translucent) return;

View File

@@ -1,11 +1,11 @@
#include <llmr/renderer/painter.hpp>
#include <llmr/renderer/text_bucket.hpp>
#include <llmr/style/style_layer.hpp>
#include <llmr/map/map.hpp>
#include <llmr/util/math.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/renderer/text_bucket.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/util/math.hpp>
#include <cmath>
using namespace llmr;
using namespace mbgl;
void Painter::renderText(TextBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id) {
// Abort early.

View File

@@ -1,8 +1,8 @@
#include <llmr/renderer/prerendered_texture.hpp>
#include <mbgl/renderer/prerendered_texture.hpp>
#include <llmr/renderer/painter.hpp>
#include <mbgl/renderer/painter.hpp>
using namespace llmr;
using namespace mbgl;
PrerenderedTexture::PrerenderedTexture(const RasterizedProperties &properties)
: properties(properties) {

View File

@@ -1,7 +1,7 @@
#include <llmr/renderer/raster_bucket.hpp>
#include <llmr/renderer/painter.hpp>
#include <mbgl/renderer/raster_bucket.hpp>
#include <mbgl/renderer/painter.hpp>
using namespace llmr;
using namespace mbgl;
RasterBucket::RasterBucket(const std::shared_ptr<Texturepool> &texturepool)
: raster(texturepool) {

View File

@@ -1,23 +1,23 @@
#include <llmr/renderer/text_bucket.hpp>
#include <llmr/geometry/text_buffer.hpp>
#include <llmr/geometry/elements_buffer.hpp>
#include <llmr/geometry/geometry.hpp>
#include <mbgl/renderer/text_bucket.hpp>
#include <mbgl/geometry/text_buffer.hpp>
#include <mbgl/geometry/elements_buffer.hpp>
#include <mbgl/geometry/geometry.hpp>
#include <llmr/renderer/painter.hpp>
#include <llmr/style/style.hpp>
#include <llmr/map/vector_tile.hpp>
#include <llmr/text/placement.hpp>
#include <llmr/text/glyph_store.hpp>
#include <llmr/util/constants.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/map/vector_tile.hpp>
#include <mbgl/text/placement.hpp>
#include <mbgl/text/glyph_store.hpp>
#include <mbgl/util/constants.hpp>
#include <llmr/util/math.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/util/math.hpp>
#include <mbgl/platform/gl.hpp>
#include <iostream>
#include <cassert>
using namespace llmr;
using namespace mbgl;
TextBucket::TextBucket(
TextVertexBuffer &vertexBuffer,

View File

@@ -1,10 +1,10 @@
#include <llmr/shader/composite_shader.hpp>
#include <llmr/shader/shaders.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/shader/composite_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
CompositeShader::CompositeShader()
: Shader(

View File

@@ -1,10 +1,10 @@
#include <llmr/shader/dot_shader.hpp>
#include <llmr/shader/shaders.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/shader/dot_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
DotShader::DotShader()
: Shader(

View File

@@ -1,10 +1,10 @@
#include <llmr/shader/gaussian_shader.hpp>
#include <llmr/shader/shaders.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/shader/gaussian_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
GaussianShader::GaussianShader()
: Shader(

View File

@@ -1,10 +1,10 @@
#include <llmr/shader/icon_shader.hpp>
#include <llmr/shader/shaders.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/shader/icon_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
IconShader::IconShader()
: Shader(

View File

@@ -1,10 +1,10 @@
#include <llmr/shader/line_shader.hpp>
#include <llmr/shader/shaders.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/shader/line_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
LineShader::LineShader()
: Shader(

View File

@@ -1,10 +1,10 @@
#include <llmr/shader/linejoin_shader.hpp>
#include <llmr/shader/shaders.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/shader/linejoin_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
LinejoinShader::LinejoinShader()
: Shader(

View File

@@ -1,10 +1,10 @@
#include <llmr/shader/outline_shader.hpp>
#include <llmr/shader/shaders.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/shader/outline_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
OutlineShader::OutlineShader()
: Shader(

View File

@@ -1,10 +1,10 @@
#include <llmr/shader/pattern_shader.hpp>
#include <llmr/shader/shaders.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/shader/pattern_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
PatternShader::PatternShader()
: Shader(

View File

@@ -1,10 +1,10 @@
#include <llmr/shader/plain_shader.hpp>
#include <llmr/shader/shaders.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/shader/plain_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
PlainShader::PlainShader()
: Shader(

View File

@@ -1,10 +1,10 @@
#include <llmr/shader/raster_shader.hpp>
#include <llmr/shader/shaders.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/shader/raster_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
RasterShader::RasterShader()
: Shader(

View File

@@ -1,12 +1,12 @@
#include <llmr/shader/shader.hpp>
#include <llmr/platform/gl.hpp>
#include <llmr/util/timer.hpp>
#include <llmr/platform/log.hpp>
#include <mbgl/shader/shader.hpp>
#include <mbgl/platform/gl.hpp>
#include <mbgl/util/timer.hpp>
#include <mbgl/platform/log.hpp>
#include <cstring>
#include <cstdlib>
using namespace llmr;
using namespace mbgl;
Shader::Shader(const GLchar *vertSource, const GLchar *fragSource)
: valid(false),

View File

@@ -1,10 +1,10 @@
#include <llmr/shader/text_shader.hpp>
#include <llmr/shader/shaders.hpp>
#include <llmr/platform/gl.hpp>
#include <mbgl/shader/text_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace llmr;
using namespace mbgl;
TextShader::TextShader()
: Shader(

View File

@@ -1,6 +1,6 @@
#include <llmr/style/applied_class_properties.hpp>
#include <mbgl/style/applied_class_properties.hpp>
namespace llmr {
namespace mbgl {
AppliedClassProperty::AppliedClassProperty(ClassID class_id, timestamp begin, timestamp end, const PropertyValue &value)
: name(class_id),

View File

@@ -1,6 +1,6 @@
#include <llmr/style/class_dictionary.hpp>
#include <mbgl/style/class_dictionary.hpp>
namespace llmr {
namespace mbgl {
ClassID ClassDictionary::Lookup(const std::string &class_name) {
auto it = store.find(class_name);

View File

@@ -1,6 +1,6 @@
#include <llmr/style/class_properties.hpp>
#include <mbgl/style/class_properties.hpp>
namespace llmr {
namespace mbgl {
const PropertyTransition &ClassProperties::getTransition(PropertyKey key, const PropertyTransition &defaultTransition) const {
auto it = transitions.find(key);

View File

@@ -1,11 +1,11 @@
#include <llmr/map/vector_tile.hpp>
#include <llmr/style/filter_comparison_private.hpp>
#include <mbgl/map/vector_tile.hpp>
#include <mbgl/style/filter_comparison_private.hpp>
#include <llmr/style/value_comparison.hpp>
#include <mbgl/style/value_comparison.hpp>
#include <ostream>
namespace llmr {
namespace mbgl {
inline bool includes(const Value &property_value, const std::vector<Value> &filter_values) {

View File

@@ -1,11 +1,11 @@
#include <llmr/style/filter_expression_private.hpp>
#include <llmr/map/vector_tile.hpp>
#include <mbgl/style/filter_expression_private.hpp>
#include <mbgl/map/vector_tile.hpp>
#include <llmr/style/value_comparison.hpp>
#include <mbgl/style/value_comparison.hpp>
#include <ostream>
namespace llmr {
namespace mbgl {
std::ostream& operator <<(std::ostream &s, FilterExpression::Operator op) {
switch (op) {

View File

@@ -1,9 +1,9 @@
#include <llmr/style/function_properties.hpp>
#include <llmr/style/types.hpp>
#include <mbgl/style/function_properties.hpp>
#include <mbgl/style/types.hpp>
#include <cmath>
namespace llmr {
namespace mbgl {
template <>

View File

@@ -1,6 +1,6 @@
#include <llmr/style/property_fallback.hpp>
#include <mbgl/style/property_fallback.hpp>
namespace llmr {
namespace mbgl {
const std::map<PropertyKey, PropertyValue> PropertyFallbackValue::properties = {
{ PropertyKey::FillAntialias, true },

View File

@@ -1,16 +1,16 @@
#include <llmr/style/style.hpp>
#include <llmr/style/style_layer_group.hpp>
#include <llmr/style/style_parser.hpp>
#include <llmr/style/style_bucket.hpp>
#include <llmr/util/constants.hpp>
#include <llmr/util/time.hpp>
#include <llmr/util/error.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/style_layer_group.hpp>
#include <mbgl/style/style_parser.hpp>
#include <mbgl/style/style_bucket.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/time.hpp>
#include <mbgl/util/error.hpp>
#include <csscolorparser/csscolorparser.hpp>
#include <rapidjson/document.h>
namespace llmr {
namespace mbgl {
Style::Style() {
}

View File

@@ -1,6 +1,6 @@
#include <llmr/style/style_bucket.hpp>
#include <mbgl/style/style_bucket.hpp>
namespace llmr {
namespace mbgl {
StyleBucket::StyleBucket(StyleLayerType type) {
switch (type) {

View File

@@ -1,9 +1,9 @@
#include <llmr/style/style_layer.hpp>
#include <llmr/style/style_bucket.hpp>
#include <llmr/style/style_layer_group.hpp>
#include <llmr/style/property_fallback.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/style/style_bucket.hpp>
#include <mbgl/style/style_layer_group.hpp>
#include <mbgl/style/property_fallback.hpp>
namespace llmr {
namespace mbgl {
StyleLayer::StyleLayer(const std::string &id, std::map<ClassID, ClassProperties> &&styles,
std::unique_ptr<const RasterizeProperties> &&rasterize)

View File

@@ -1,7 +1,7 @@
#include <llmr/style/style_layer_group.hpp>
#include <mbgl/style/style_layer_group.hpp>
namespace llmr {
namespace mbgl {
void StyleLayerGroup::setClasses(const std::vector<std::string> &class_names, timestamp now,
const PropertyTransition &defaultTransition) {

View File

@@ -1,10 +1,10 @@
#include <llmr/style/style_parser.hpp>
#include <llmr/style/style_layer_group.hpp>
#include <llmr/util/constants.hpp>
#include <llmr/util/std.hpp>
#include <mbgl/style/style_parser.hpp>
#include <mbgl/style/style_layer_group.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/std.hpp>
#include <csscolorparser/csscolorparser.hpp>
namespace llmr {
namespace mbgl {
using JSVal = const rapidjson::Value&;

View File

@@ -1,6 +1,6 @@
#include <llmr/style/style_properties.hpp>
#include <mbgl/style/style_properties.hpp>
namespace llmr {
namespace mbgl {
template<> const FillProperties &defaultStyleProperties() { static const FillProperties p; return p; }
template<> const LineProperties &defaultStyleProperties() { static const LineProperties p; return p; }

View File

@@ -1,4 +1,4 @@
#include <llmr/style/value.hpp>
#include <mbgl/style/value.hpp>
#pragma GCC diagnostic push
#ifndef __clang__
@@ -7,7 +7,7 @@
#include <boost/lexical_cast.hpp>
#pragma GCC diagnostic pop
llmr::Value llmr::parseValue(pbf data) {
mbgl::Value mbgl::parseValue(pbf data) {
while (data.next())
{
switch (data.tag)
@@ -34,7 +34,7 @@ llmr::Value llmr::parseValue(pbf data) {
return false;
}
std::string llmr::toString(const llmr::Value& value) {
std::string mbgl::toString(const mbgl::Value& value) {
if (value.is<std::string>()) return value.get<std::string>();
else if (value.is<bool>()) return value.get<bool>() ? "true" : "false";
else if (value.is<int64_t>()) return std::to_string(value.get<int64_t>());

View File

@@ -1,6 +1,6 @@
#include <llmr/text/collision.hpp>
#include <llmr/text/rotation_range.hpp>
#include <llmr/util/math.hpp>
#include <mbgl/text/collision.hpp>
#include <mbgl/text/rotation_range.hpp>
#include <mbgl/util/math.hpp>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
@@ -14,7 +14,7 @@
#include <boost/geometry/index/rtree.hpp>
#pragma GCC diagnostic pop
namespace llmr {
namespace mbgl {
namespace bg = boost::geometry;
namespace bgm = bg::model;
namespace bgi = bg::index;
@@ -24,7 +24,7 @@ typedef std::pair<Box, PlacementBox> PlacementValue;
typedef bgi::rtree<PlacementValue, bgi::rstar<16>> Tree;
}
using namespace llmr;
using namespace mbgl;
Collision::~Collision() {
delete ((Tree *)cTree);

View File

@@ -1,6 +1,6 @@
#include <llmr/text/glyph.hpp>
#include <mbgl/text/glyph.hpp>
namespace llmr {
namespace mbgl {
// Note: this only works for the BMP
// Note: we could use a binary lookup table to get averaged constant time lookups, however,

View File

@@ -1,16 +1,16 @@
#include <llmr/text/glyph_store.hpp>
#include <mbgl/text/glyph_store.hpp>
#include <llmr/util/std.hpp>
#include <llmr/util/string.hpp>
#include <llmr/util/utf.hpp>
#include <llmr/util/pbf.hpp>
#include <llmr/util/constants.hpp>
#include <llmr/util/token.hpp>
#include <llmr/platform/platform.hpp>
#include <mbgl/util/std.hpp>
#include <mbgl/util/string.hpp>
#include <mbgl/util/utf.hpp>
#include <mbgl/util/pbf.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/token.hpp>
#include <mbgl/platform/platform.hpp>
#include <uv.h>
#include <algorithm>
namespace llmr {
namespace mbgl {
void FontStack::insert(uint32_t id, const SDFGlyph &glyph) {

View File

@@ -1,13 +1,13 @@
#include <llmr/text/placement.hpp>
#include <llmr/map/vector_tile.hpp>
#include <llmr/geometry/interpolate.hpp>
#include <llmr/renderer/text_bucket.hpp>
#include <llmr/util/math.hpp>
#include <llmr/util/constants.hpp>
#include <mbgl/text/placement.hpp>
#include <mbgl/map/vector_tile.hpp>
#include <mbgl/geometry/interpolate.hpp>
#include <mbgl/renderer/text_bucket.hpp>
#include <mbgl/util/math.hpp>
#include <mbgl/util/constants.hpp>
#include <algorithm>
using namespace llmr;
using namespace mbgl;
const int Placement::tileExtent = 4096;
const int Placement::glyphSize =

View File

@@ -1,9 +1,9 @@
#include <llmr/text/rotation_range.hpp>
#include <mbgl/text/rotation_range.hpp>
#include <cassert>
#include <algorithm>
namespace llmr {
namespace mbgl {
/*
* Combine an array of collision ranges to form a continuous

View File

@@ -1,7 +1,7 @@
#include <llmr/util/clip_ids.hpp>
#include <llmr/map/tile.hpp>
#include <mbgl/util/clip_ids.hpp>
#include <mbgl/map/tile.hpp>
#include <llmr/util/math.hpp>
#include <mbgl/util/math.hpp>
#include <list>
#include <vector>
@@ -10,7 +10,7 @@
#include <iostream>
#include <algorithm>
namespace llmr {
namespace mbgl {
struct TileHierarchy {
TileHierarchy(Tile::ID id, std::list<TileHierarchy> &&children)

View File

@@ -1,11 +1,11 @@
#include <llmr/util/image.hpp>
#include <mbgl/util/image.hpp>
#include <png.h>
#include <cassert>
#include <cstdlib>
std::string llmr::util::compress_png(int width, int height, void *rgba, bool flip) {
std::string mbgl::util::compress_png(int width, int height, void *rgba, bool flip) {
png_voidp error_ptr = 0;
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, error_ptr, NULL, NULL);
if (!png_ptr) {
@@ -53,7 +53,7 @@ std::string llmr::util::compress_png(int width, int height, void *rgba, bool fli
}
using namespace llmr::util;
using namespace mbgl::util;
struct Buffer {

View File

@@ -1,4 +1,4 @@
#include <llmr/util/io.hpp>
#include <mbgl/util/io.hpp>
#include <cstdio>
#include <iostream>
@@ -6,7 +6,7 @@
#include <fstream>
#include <stdexcept>
namespace llmr {
namespace mbgl {
namespace util {
void write_file(const std::string &filename, const std::string &data) {

View File

@@ -20,11 +20,11 @@
//
// 3. This notice may not be removed or altered from any source distribution.
#include <llmr/util/mat4.hpp>
#include <mbgl/util/mat4.hpp>
#include <cmath>
using namespace llmr;
using namespace mbgl;
void matrix::identity(mat4& out) {
out[0] = 1.0f;

View File

@@ -1,18 +1,18 @@
#include <llmr/util/raster.hpp>
#include <mbgl/util/raster.hpp>
#include <memory>
#include <cassert>
#include <cstring>
#include <llmr/platform/platform.hpp>
#include <llmr/platform/gl.hpp>
#include <llmr/util/time.hpp>
#include <llmr/util/uv.hpp>
#include <llmr/util/std.hpp>
#include <mbgl/platform/platform.hpp>
#include <mbgl/platform/gl.hpp>
#include <mbgl/util/time.hpp>
#include <mbgl/util/uv.hpp>
#include <mbgl/util/std.hpp>
#include <png.h>
using namespace llmr;
using namespace mbgl;
Raster::Raster(const std::shared_ptr<Texturepool> &texturepool)
: texturepool(texturepool)

View File

@@ -1,10 +1,10 @@
#include <llmr/util/texturepool.hpp>
#include <mbgl/util/texturepool.hpp>
#include <vector>
const int TextureMax = 64;
using namespace llmr;
using namespace mbgl;
GLuint Texturepool::getTextureID() {
if (texture_ids.empty()) {

View File

@@ -1,11 +1,11 @@
#include <llmr/util/threadpool.hpp>
#include <llmr/util/std.hpp>
#include <mbgl/util/threadpool.hpp>
#include <mbgl/util/std.hpp>
#include <thread>
#include <memory>
using namespace llmr::util;
using namespace mbgl::util;
std::unique_ptr<Threadpool> llmr::util::threadpool = std::make_unique<Threadpool>(std::thread::hardware_concurrency());
std::unique_ptr<Threadpool> mbgl::util::threadpool = std::make_unique<Threadpool>(std::thread::hardware_concurrency());
Threadpool::Threadpool(int max_workers)
: max_workers(max_workers) {

View File

@@ -1,12 +1,12 @@
#ifndef DISABLE_TIMER
#include <llmr/util/timer.hpp>
#include <llmr/util/time.hpp>
#include <llmr/platform/log.hpp>
#include <mbgl/util/timer.hpp>
#include <mbgl/util/time.hpp>
#include <mbgl/platform/log.hpp>
#include <iostream>
#include <atomic>
using namespace llmr::util;
using namespace mbgl::util;
timer::timer(Event event)
: event(event), start(now()) {}

View File

@@ -1,8 +1,8 @@
#include <llmr/util/transition.hpp>
#include <llmr/util/unitbezier.hpp>
#include <llmr/platform/platform.hpp>
#include <mbgl/util/transition.hpp>
#include <mbgl/util/unitbezier.hpp>
#include <mbgl/platform/platform.hpp>
namespace llmr { namespace util {
namespace mbgl { namespace util {
UnitBezier ease(0, 0, 0.25, 1);
@@ -16,7 +16,7 @@ float transition::interpolateFloat(float from, float to, double t) const {
return from + (to - from) * (float)t;
}
llmr::Color transition::interpolateColor(llmr::Color from, llmr::Color to, double t) const {
mbgl::Color transition::interpolateColor(mbgl::Color from, mbgl::Color to, double t) const {
return {{ interpolateFloat(from[0], to[0], t),
interpolateFloat(from[1], to[1], t),
interpolateFloat(from[2], to[2], t),
@@ -40,7 +40,7 @@ transition::state ease_transition<double>::update(timestamp now) const {
}
template <>
transition::state ease_transition<llmr::Color>::update(timestamp now) const {
transition::state ease_transition<mbgl::Color>::update(timestamp now) const {
float t = progress(now);
if (t >= 1) {
value = to;