Giter Site home page Giter Site logo

tangrams / tangram-es Goto Github PK

View Code? Open in Web Editor NEW
805.0 71.0 234.0 39.55 MB

2D and 3D map renderer using OpenGL ES

License: MIT License

CMake 0.49% C 42.04% Shell 0.02% Java 2.13% C++ 53.42% Objective-C 0.70% GLSL 0.34% Makefile 0.07% Objective-C++ 0.71% Python 0.02% Ruby 0.01% Swift 0.04%
android ios macos linux c-plus-plus opengl-es raspberry-pi map tangram mapzen

tangram-es's Introduction

Tangram ES

CircleCI Windows CI Contributor Covenant

Tangram ES is a C++ library for rendering 2D and 3D maps from vector data using OpenGL ES. It is a counterpart to Tangram.

This repository contains both the core rendering library and sample applications that use the library on Android, iOS, macOS, Ubuntu, Windows, and Raspberry Pi.

screenshot

Platform Targets

For more information about building Tangram ES or using it in your project, see the individual platform pages below:

Support

For concept overviews and technical reference, see the Tangram Documentation.

You can also find us in the tangram-chat gitter chat room: https://gitter.im/tangrams/tangram-chat

Contributions Welcome

We gladly appreciate feedback, feature requests, and contributions. For information and instructions, see CONTRIBUTING.md.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See CODE_OF_CONDUCT.md.

Tangram ES was created by Mapzen and is now a Linux Foundation Project.

tangram-es's People

Contributors

bcamper avatar bentley avatar bquast avatar cleeus avatar dastmetz avatar dgngulcan avatar dragoon87 avatar ecgreb avatar hallahan avatar hanchao avatar hjanetzek avatar karimnaaji avatar kingofirony avatar matkoniecz avatar matteblair avatar meetar avatar moskvax avatar msmollin avatar nvkelso avatar patriciogonzalezvivo avatar pnorman avatar polar avatar rmarianski avatar sarahsnow1 avatar seubseub avatar sopyer avatar tallytalwar avatar vespakoen avatar westnordost avatar zarov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tangram-es's Issues

Crash when updating client data source

The crash results from a particular timing of multi-threaded activity and is therefore difficult to reproduce.

The suspected cause is that the "store" of data for a geojsonvt data source is cleared while a worker thread is parsing data from that source, leading the worker to access freed memory.

Desktop client can crash on unexpected HTTP response

A URL request can sometimes return data in an unexpected form, e.g. when a malformed MVT tile request returns with a status 429 the response body is a JSON object of metadata (instead of a protocol buffer).

For URL requests processed by OkHTTP on Android, these qualify as errors and so the response body is never sent to Tangram.

However NSURLSession (and probably libcurl as well) does not count these status codes as errors, it simply passes any response body along to Tangram. For MVT tiles, this causes the protobuff parser to segfault.

Ideally, the protobuff parser would be robust enough to at least not segfault when data is malformed. But a simpler solution to this particular issue is to check the status codes of HTTP responses received through NSURLSession and libcurl and skip any responses that are not "successful".

zoom, tilt, rotate keymaps behaving unexpectedly on Linux

The keymap/scroll combinations to zoom, tilt, and rotate the view are behaving weirdly on Linux. When I launch tangram, scrolling will zoom. Pressing shift once, releasing, and then scrolling will rotate, while doing the same thing but with ctrl will cause tilting. After that, I have to press ctrl and shift to alternate between tilting/rotating, and need to hold ctrl/shift and scroll to zoom.

make rpi error on Pi2

pi@raspberrypi ~/tangram-es $ make rpi
-- The C compiler identification is GNU 4.6.3
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++-4.7
-- Check for working CXX compiler: /usr/bin/g++-4.7 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Platform chosen : RASPBERRYPI
-- Including raspberrypi dependent cmake file : /home/pi/tangram-es/toolchains/raspberrypi.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/tangram-es/build/rpi
make[1]: Entering directory '/home/pi/tangram-es/build/rpi'
make[2]: Entering directory '/home/pi/tangram-es/build/rpi'
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
Scanning dependencies of target libtess2
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
[ 2%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/sweep.c.o
[ 4%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/geom.c.o
[ 7%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/mesh.c.o
[ 9%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/tess.c.o
[ 11%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/bucketalloc.c.o
[ 14%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/priorityq.c.o
[ 16%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/dict.c.o
Linking C static library ../../../lib/liblibtess2.a
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
[ 16%] Built target libtess2
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
Scanning dependencies of target core
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
[ 19%] Building CXX object core/CMakeFiles/core.dir/src/scene/directionalLight.cpp.o
[ 21%] Building CXX object core/CMakeFiles/core.dir/src/scene/scene.cpp.o
[ 23%] Building CXX object core/CMakeFiles/core.dir/src/scene/light.cpp.o
[ 26%] Building CXX object core/CMakeFiles/core.dir/src/scene/spotLight.cpp.o
[ 28%] Building CXX object core/CMakeFiles/core.dir/src/scene/pointLight.cpp.o
[ 30%] Building CXX object core/CMakeFiles/core.dir/src/scene/material.cpp.o
[ 33%] Building CXX object core/CMakeFiles/core.dir/src/style/style.cpp.o
[ 35%] Building CXX object core/CMakeFiles/core.dir/src/style/polylineStyle.cpp.o
[ 38%] Building CXX object core/CMakeFiles/core.dir/src/style/polygonStyle.cpp.o
[ 40%] Building CXX object core/CMakeFiles/core.dir/src/style/fontStyle.cpp.o
[ 42%] Building CXX object core/CMakeFiles/core.dir/src/tangram.cpp.o
[ 45%] Building CXX object core/CMakeFiles/core.dir/src/view/view.cpp.o
[ 47%] Building CXX object core/CMakeFiles/core.dir/src/text/fontContext.cpp.o
[ 50%] Building CXX object core/CMakeFiles/core.dir/src/text/textBuffer.cpp.o
[ 52%] Building CXX object core/CMakeFiles/core.dir/src/data/protobufSource.cpp.o
[ 54%] Building CXX object core/CMakeFiles/core.dir/src/data/dataSource.cpp.o
[ 57%] Building CXX object core/CMakeFiles/core.dir/src/data/geoJsonSource.cpp.o
[ 59%] Building CXX object core/CMakeFiles/core.dir/src/util/builders.cpp.o
[ 61%] Building CXX object core/CMakeFiles/core.dir/src/util/rectangle.cpp.o
[ 64%] Building CXX object core/CMakeFiles/core.dir/src/util/error.cpp.o
[ 66%] Building CXX object core/CMakeFiles/core.dir/src/util/geom.cpp.o
[ 69%] Building CXX object core/CMakeFiles/core.dir/src/util/geoJson.cpp.o
[ 71%] Building CXX object core/CMakeFiles/core.dir/src/util/mapProjection.cpp.o
[ 73%] Building CXX object core/CMakeFiles/core.dir/src/util/vboMesh.cpp.o
[ 76%] Building CXX object core/CMakeFiles/core.dir/src/util/shaderProgram.cpp.o
[ 78%] Building CXX object core/CMakeFiles/core.dir/src/util/pbfParser.cpp.o
[ 80%] Building CXX object core/CMakeFiles/core.dir/src/util/vertexLayout.cpp.o
[ 83%] Building CXX object core/CMakeFiles/core.dir/src/util/texture.cpp.o
[ 85%] Building CXX object core/CMakeFiles/core.dir/src/tile/mapTile.cpp.o
[ 88%] Building CXX object core/CMakeFiles/core.dir/src/tile/tileManager.cpp.o
[ 90%] Building CXX object core/CMakeFiles/core.dir/src/tile/labels/label.cpp.o
[ 92%] Building CXX object core/CMakeFiles/core.dir/src/tile/labels/labelContainer.cpp.o
[ 95%] Building CXX object core/CMakeFiles/core.dir/src/tile/tileWorker.cpp.o
Linking CXX static library ../lib/libcore.a
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
[ 95%] Built target core
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
Scanning dependencies of target tangram
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
[ 97%] Building CXX object CMakeFiles/tangram.dir/rpi/src/main.cpp.o
/home/pi/tangram-es/rpi/src/main.cpp:49:2: warning: ‘typedef’ was ignored in this declaration [enabled by default]
/home/pi/tangram-es/rpi/src/main.cpp: In function ‘void initOpenGL()’:
/home/pi/tangram-es/rpi/src/main.cpp:179:124: warning: invalid conversion from ‘int’ to ‘DISPMANX_TRANSFORM_T’ [-fpermissive]
In file included from /opt/vc/include/bcm_host.h:50:0,
from /home/pi/tangram-es/core/src/gl.h:30,
from /home/pi/tangram-es/rpi/src/main.cpp:14:
/opt/vc/include/interface/vmcs_host/vc_dispmanx.h:85:44: warning: initializing argument 10 of ‘DISPMANX_ELEMENT_HANDLE_T vc_dispmanx_element_add(DISPMANX_UPDATE_HANDLE_T, DISPMANX_DISPLAY_HANDLE_T, int32_t, const VC_RECT_T_, DISPMANX_RESOURCE_HANDLE_T, const VC_RECT_T_, DISPMANX_PROTECTION_T, VC_DISPMANX_ALPHA_T_, DISPMANX_CLAMP_T_, DISPMANX_TRANSFORM_T)’ [-fpermissive]
/home/pi/tangram-es/rpi/src/main.cpp: In function ‘int main(int, char*)’:
/home/pi/tangram-es/rpi/src/main.cpp:349:75: error: too few arguments to function ‘void Tangram::handlePanGesture(float, float, float, float)’
In file included from /home/pi/tangram-es/rpi/src/main.cpp:12:0:
/home/pi/tangram-es/core/src/tangram.h:42:6: note: declared here
/home/pi/tangram-es/rpi/src/main.cpp:365:56: error: too few arguments to function ‘void Tangram::handlePanGesture(float, float, float, float)’
In file included from /home/pi/tangram-es/rpi/src/main.cpp:12:0:
/home/pi/tangram-es/core/src/tangram.h:42:6: note: declared here
/home/pi/tangram-es/rpi/src/main.cpp:368:57: error: too few arguments to function ‘void Tangram::handlePanGesture(float, float, float, float)’
In file included from /home/pi/tangram-es/rpi/src/main.cpp:12:0:
/home/pi/tangram-es/core/src/tangram.h:42:6: note: declared here
/home/pi/tangram-es/rpi/src/main.cpp:371:56: error: too few arguments to function ‘void Tangram::handlePanGesture(float, float, float, float)’
In file included from /home/pi/tangram-es/rpi/src/main.cpp:12:0:
/home/pi/tangram-es/core/src/tangram.h:42:6: note: declared here
/home/pi/tangram-es/rpi/src/main.cpp:374:57: error: too few arguments to function ‘void Tangram::handlePanGesture(float, float, float, float)’
In file included from /home/pi/tangram-es/rpi/src/main.cpp:12:0:
/home/pi/tangram-es/core/src/tangram.h:42:6: note: declared here
CMakeFiles/tangram.dir/build.make:54: recipe for target 'CMakeFiles/tangram.dir/rpi/src/main.cpp.o' failed
make[3]: *
* [CMakeFiles/tangram.dir/rpi/src/main.cpp.o] Error 1
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/tangram.dir/all' failed
make[2]: *** [CMakeFiles/tangram.dir/all] Error 2
make[2]: Leaving directory '/home/pi/tangram-es/build/rpi'
Makefile:72: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/pi/tangram-es/build/rpi'
Makefile:153: recipe for target 'rpi' failed
make: *** [rpi] Error 2
pi@raspberrypi ~/tangram-es $

Make error: does not contain a CMakeLists.txt file

When I make osx, I get the following error:

You have called ADD_LIBRARY for library libtess2 without any source files. This typically indicates a problem with your CMakeLists.txt file
CMake Error at core/CMakeLists.txt:15 (add_subdirectory):
  The source directory

    ~/tangram-es/core/dependencies/yaml-cpp

  does not contain a CMakeLists.txt file.


-- Configuring incomplete, errors occurred!

Am I missing something from the install? Cheers!

Proxy geometry drawn at misleading depth

Geometry from proxy tiles appears to sometimes draw over geometry that should occlude it in 3D space, especially in tilted views.

I suspect that it's a consequence of this line: https://github.com/tangrams/tangram-es/blob/master/core/resources/shaders/polygon.vs#L93 (and the corresponding line in the polyline shader).

// Proxy tiles have u_tile_origin.z < 0, so this re-scaling will place proxy tiles deeper in
// the depth buffer than non-proxy tiles by a distance that increases with tile zoom
gl_Position.z /= 1. + .1 * (abs(u_tile_origin.z) - u_tile_origin.z);

Clearly this was deliberate, and solves (or used to solve) some problem, but now when I comment out these lines the visual result is much more pleasant.

@tallytalwar @karimnaaji Thoughts?

compile error raspberry-pi

pi@raspberrypi ~/tangram-es $ sudo apt-get install cmake g++-4.7 libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
cmake is already the newest version.
g++-4.7 is already the newest version.
libcurl4-openssl-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi ~/tangram-es $ make rpi
-- Platform chosen : RASPBERRYPI
-- Including raspberrypi dependent cmake file : /home/pi/tangram-es/toolchains/raspberrypi.cmake
CMake Error at toolchains/raspberrypi.cmake:14 (message):
Please install g++ version 4.7 or greater
Call Stack (most recent call first):
CMakeLists.txt:50 (include)

-- Configuring incomplete, errors occurred!
Makefile:164: recipe for target 'cmake-rpi' failed
make: *** [cmake-rpi] Error 1
pi@raspberrypi ~/tangram-es $

i am getting the following error on raspberry pi both 1& 2 model.
it was compiling fine a few days back...

"make ios" fails to compile due to attempting to codesign a universal binary

Tangram's build system probably shouldn't be going through the hoops of running compilation for iOS devices; much of that needs to be configured inside of Xcode beforehand, and certificate chains need to be in place, etc. Is there a reason it is going through this step?

Log output:

=== BUILD TARGET tangram OF PROJECT tangram WITH THE DEFAULT CONFIGURATION (Debug) ===

Check dependencies
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 9.2'

** BUILD FAILED **

Segmentation fault while displaying a map

The app was in the foreground but I was not actively using it. Next time I looked over at the device it had crashed with the following error in the logcat.

07-07 17:54:28.306    1469-3069/? A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8447ab5 in tid 3069 (GLThread 1215)
07-07 17:54:28.414      193-193/? A/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-07 17:54:28.414      193-193/? A/DEBUG﹕ Build fingerprint: 'google/hammerhead/hammerhead:M/MPZ44Q/1960707:user/release-keys'
07-07 17:54:28.414      193-193/? A/DEBUG﹕ Revision: '0'
07-07 17:54:28.414      193-193/? A/DEBUG﹕ ABI: 'arm'
07-07 17:54:28.414      193-193/? A/DEBUG﹕ pid: 1469, tid: 3069, name: GLThread 1215  >>> com.mapzen.erasermap <<<
07-07 17:54:28.414      193-193/? A/DEBUG﹕ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8447ab5
07-07 17:54:28.464      193-193/? A/DEBUG﹕ r0 00000000  r1 00000001  r2 b5d4cd51  r3 08447ab5
07-07 17:54:28.464      193-193/? A/DEBUG﹕ r4 99f19f58  r5 99e969d8  r6 12da3150  r7 6f341804
07-07 17:54:28.464      193-193/? A/DEBUG﹕ r8 12da3150  r9 97ae6d00  sl 12d44700  fp 9ac7caa4
07-07 17:54:28.464      193-193/? A/DEBUG﹕ ip af01ad40  sp 9ac7c9f8  lr aef4c958  pc aef4c9ac  cpsr 200f0010
07-07 17:54:28.517      193-193/? A/DEBUG﹕ backtrace:
07-07 17:54:28.517      193-193/? A/DEBUG﹕ #00 pc 001049ac  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<unsigned int, GLFONSbuffer*>, void*>*> std::__1::__hash_table<std::__1::__hash_value_type<unsigned int, GLFONSbuffer*>, std::__1::__unordered_map_hasher<unsigned int, std::__1::__hash_value_type<unsigned int, GLFONSbuffer*>, std::__1::hash<unsigned int>, true>, std::__1::__unordered_map_equal<unsigned int, std::__1::__hash_value_type<unsigned int, GLFONSbu
07-07 17:54:28.517      193-193/? A/DEBUG﹕ #01 pc 000fdedc  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (glfonsBufferDelete(FONScontext*, unsigned int)+136)
07-07 17:54:28.517      193-193/? A/DEBUG﹕ #02 pc 000ed1b4  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (TextBuffer::~TextBuffer()+40)
07-07 17:54:28.517      193-193/? A/DEBUG﹕ #03 pc 00109ebc  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (std::__1::__shared_ptr_pointer<TextBuffer*, std::__1::default_delete<TextBuffer>, std::__1::allocator<TextBuffer> >::__on_zero_shared()+124)
07-07 17:54:28.517      193-193/? A/DEBUG﹕ #04 pc 000805f0  /data/app/com.mapzen.erasermap-1/lib/arm/libc++_shared.so (std::__1::__shared_weak_count::__release_shared()+68)
07-07 17:54:28.518      193-193/? A/DEBUG﹕ #05 pc 000d8794  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (std::__1::shared_ptr<TextBuffer>::~shared_ptr()+44)
07-07 17:54:28.518      193-193/? A/DEBUG﹕ #06 pc 000e10a8  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::shared_ptr<TextBuffer> >::~pair()+28)
07-07 17:54:28.518      193-193/? A/DEBUG﹕ #07 pc 000d91c8  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<TextBuffer> >, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<TextBuffer> >, std::__1
07-07 17:54:28.518      193-193/? A/DEBUG﹕ #08 pc 000d7d10  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<TextBuffer> >, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<TextBuffer> >, std::__1
07-07 17:54:28.519      193-193/? A/DEBUG﹕ #09 pc 000d5fb8  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<TextBuffer>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::shared_ptr<TextBuffer> > > >::~map()+24)
07-07 17:54:28.519      193-193/? A/DEBUG﹕ #10 pc 000d68b0  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (MapTile::~MapTile()+56)
07-07 17:54:28.519      193-193/? A/DEBUG﹕ #11 pc 000d6928  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (MapTile::~MapTile()+20)
07-07 17:54:28.519      193-193/? A/DEBUG﹕ #12 pc 000ce044  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (std::__1::__shared_ptr_pointer<MapTile*, std::__1::default_delete<MapTile>, std::__1::allocator<MapTile> >::__on_zero_shared()+140)
07-07 17:54:28.519      193-193/? A/DEBUG﹕ #13 pc 000805f0  /data/app/com.mapzen.erasermap-1/lib/arm/libc++_shared.so (std::__1::__shared_weak_count::__release_shared()+68)
07-07 17:54:28.519      193-193/? A/DEBUG﹕ #14 pc 000cc42c  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (std::__1::shared_ptr<MapTile>::~shared_ptr()+44)
07-07 17:54:28.519      193-193/? A/DEBUG﹕ #15 pc 000d5b58  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (std::__1::pair<TileID const, std::__1::shared_ptr<MapTile> >::~pair()+28)
07-07 17:54:28.519      193-193/? A/DEBUG﹕ #16 pc 000d4628  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (std::__1::__tree<std::__1::__value_type<TileID, std::__1::shared_ptr<MapTile> >, std::__1::__map_value_compare<TileID, std::__1::__value_type<TileID, std::__1::shared_ptr<MapTile> >, std::__1::less<TileID>, true>, std::__1::allocator<std::__1::__value_type<TileID, std::__1::shared_ptr<MapTile> > > >::erase(std::__1::__tree_const_iterator<std::__1::__value_type<TileID, std::__1::shared_ptr<MapTile> >, std::__1::__tree_node<std::__1
07-07 17:54:28.520      193-193/? A/DEBUG﹕ #17 pc 000d1394  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (TileManager::removeTile(std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::__value_type<TileID, std::__1::shared_ptr<MapTile> >, std::__1::__tree_node<std::__1::__value_type<TileID, std::__1::shared_ptr<MapTile> >, void*>*, int> >&)+1276)
07-07 17:54:28.520      193-193/? A/DEBUG﹕ #18 pc 000d08cc  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (TileManager::updateTileSet()+3040)
07-07 17:54:28.520      193-193/? A/DEBUG﹕ #19 pc 0010b8c0  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (Tangram::update(float)+152)
07-07 17:54:28.520      193-193/? A/DEBUG﹕ #20 pc 0017e8f8  /data/app/com.mapzen.erasermap-1/lib/arm/libtangram.so (Java_com_mapzen_tangram_MapController_update+28)
07-07 17:54:28.520      193-193/? A/DEBUG﹕ #21 pc 014e2c05  /data/app/com.mapzen.erasermap-1/oat/arm/base.odex (void com.mapzen.tangram.MapController.update(float)+80)
07-07 17:54:28.520      193-193/? A/DEBUG﹕ #22 pc 014e32e5  /data/app/com.mapzen.erasermap-1/oat/arm/base.odex (void com.mapzen.tangram.MapController.onDrawFrame(javax.microedition.khronos.opengles.GL10)+256)
07-07 17:54:28.520      193-193/? A/DEBUG﹕ #23 pc 726e35fd  /data/dalvik-cache/arm/system@[email protected]
07-07 17:54:29.128      193-193/? A/DEBUG﹕ Tombstone written to: /data/tombstones/tombstone_02
07-07 17:54:29.128      193-193/? E/DEBUG﹕ AM write failed: Broken pipe
07-07 17:54:29.208      751-837/? E/InputDispatcher﹕ channel 'f7beba3 com.mapzen.erasermap/com.mapzen.erasermap.view.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!

Android native debugging toolchain has CMake errors

Trying to build the android-debug target currently results in a CMake configuration error:

CMake Error at toolchains/android.gdb.cmake:83 (get_property):
  The LOCATION property may not be read from target "tangram".  Use the
  target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
  toolchains/android.cmake:57 (android_ndk_gdb_debuggable)
  CMakeLists.txt:60 (include)

This is due to a policy change in CMake 3.0: https://cmake.org/cmake/help/v3.3/policy/CMP0026.html

Rpi build references g++-4.7 directly instead of testing for a C++11 compiler

I am running a Raspberry Pi with GCC 4.9 instead of GCC 4.7, and had to manually switch g++-4.7 in toolchains/raspberrypi.toolchain.cmake to just g++.

Ideally you would use some sort of C++11 detection in CMake, or at least tell people that they'll need to do this to build with anything other than g++ 4.7.

Zooming gesture causes only translation at zoom limits

At the minimum and maximum zoom, a pinching or scrolling gesture will cause the view to translate (to keep the view centered on the cursor in anticipation of zooming) but will not perform the corresponding zoom (stopping zoom at these limits is expected). The result of this is that the zoom gesture will cause only translation when zoom is already at its minimum or maximum value, which is unexpected and undesirable.

Compilation of dependency geojson-vt-cpp fails on Windows

I am trying to get the demo of tangram-es running on an Android using my development environment on Windows. To compile on Windows (for Android), I use the following commandline, using CMake 3.4.0, MinGW with g++ 4.8.1, Android NDK r10e (64-bit):

    > cmake . -G"MinGW Makefiles" -DPLATFORM_TARGET=android -DMAKE_BUILD_TOOL=%ANDROID_HOME%/ndk-bundle/prebuilt/windows-x86_64/bin/make
    > cmake . --build

When the compiler reaches the compilation of geojson-vt-cpp, I get this error (and a couple of follow-ups):

In file included from tangram-es\external\geojson-vt-cpp\src\geojsonvt.cpp:1:0:
tangram-es/external/geojson-vt-cpp/include/mapbox/geojsonvt/geojsonvt.hpp:74:5: error: 'mutex' in namespace 'std' does not name a type
     std::mutex mtx;
     ^

It looks like g++ is not instructed to use -std=c++11 or higher.

Sadly, my knowledge of CMake is very superficial, so I was unable to find the problem. In external/CMakeLists.txt, I found this,

  if (GCC_VERSION VERSION_GREATER 5.1)
    add_definitions("-D_GLIBCXX_USE_CXX11_ABI=1")
  endif()

but changing 5.1 to 4.8 (g++ 4.8 and higher understands the option -std=c++11) does not change the error for me.

can't to build the project

When I use "make iOS" commond to build the project,It is failed. The log is
make ios
mkdir -p build/ios
cd build/ios &&
cmake ../.. -DPLATFORM_TARGET=ios -DIOS_PLATFORM=SIMULATOR -DCMAKE_TOOLCHAIN_FILE=build/toolchains/iOS.toolchain.cmake -G Xcode
-- Platform chosen : IOS
-- Including ios dependent cmake file : /Users/bzhang/Documents/iosprj/tangram-es/build/toolchains/ios.cmake
-- Framework CoreGraphics found
-- Framework CoreFoundation found
-- Framework QuartzCore found
-- Framework UIKit found
-- Framework OpenGLES found
-- Framework Security found
-- Framework CFNetwork found
-- Framework GLKit found
-- Configuring done
-- Generating done
/bin/sh: line 1: 1742 Segmentation fault: 11 cmake ../.. -DPLATFORM_TARGET=ios -DIOS_PLATFORM=SIMULATOR -DCMAKE_TOOLCHAIN_FILE=build/toolchains/iOS.toolchain.cmake -G Xcode
make: *** [cmake-ios] Error 139

Random crash on FontContext::lock() on app exit.

Note: Noticed on deviceFonts-android and text-color branch. Try to repro this on master.

Both the feature branches are modifying any of the code path responsible to call FontContext::lock.

Also, if reproduced update with the stacktrace.

Build problems on Ubuntu

I get

undefined reference to symbol 'XF86VidModeQueryExtension'

when I try to build on a fresh Ubuntu 15.10 installation.

Here is some more of the output:

Linking CXX executable bin/tangram
/usr/bin/ld: lib/libglfw3.a(x11_init.c.o): undefined reference to symbol 'XF86VidModeQueryExtension'
/usr/lib/x86_64-linux-gnu/libXxf86vm.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/tangram.dir/build.make:149: recipe for target 'bin/tangram' failed
make[3]: *** [bin/tangram] Error 1
make[3]: Leaving directory '/home/nicklas/dev/tangram-es/build/linux'
CMakeFiles/Makefile2:66: recipe for target 'CMakeFiles/tangram.dir/all' failed
make[2]: *** [CMakeFiles/tangram.dir/all] Error 2
make[2]: Leaving directory '/home/nicklas/dev/tangram-es/build/linux'
Makefile:116: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/nicklas/dev/tangram-es/build/linux'
Makefile:209: recipe for target 'linux' failed
make: *** [linux] Error 2

Google seems to point me in the direction of build flags and not missing dependencies.

Thanks
Nicklas Avén

Linux Clang 3.6 builds using libc++abi

I am getting the following error when trying to build tangram with clang (3.6) on linux (ubuntu 15.04).

Linking CXX executable bin/tangram
/usr/bin/ld: cannot find -lc++abi
clang: error: linker command failed with exit code 1 (use -v to see invocation)
CMakeFiles/tangram.dir/build.make:160: recipe for target 'bin/tangram' failed
make[3]: *** [bin/tangram] Error 1
make[3]: Leaving directory '/home/varun/Development/test/tangram-es/build/linux'
CMakeFiles/Makefile2:66: recipe for target 'CMakeFiles/tangram.dir/all' failed
make[2]: *** [CMakeFiles/tangram.dir/all] Error 2
make[2]: Leaving directory '/home/varun/Development/test/tangram-es/build/linux'
Makefile:117: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/varun/Development/test/tangram-es/build/linux'
Makefile:209: recipe for target 'linux' failed
make: *** [linux] Error 2

It seems like based on llvm's documentation.

Linux

You will need to keep the source tree of libc++abi available on your build machine and your copy of the libc++abi shared library must be placed where your linker will find it.

Unfortunately you can't simply run clang with "-stdlib=libc++" at this point, as clang is set up to link for libc++ linked to libsupc++. To get around this you'll have to set up your linker yourself (or patch clang). For example:

    clang++ -stdlib=libc++ helloworld.cpp -nodefaultlibs -lc++ -lc++abi -lm -lc -lgcc_s -lgcc

Alternately, you could just add libc++abi to your libraries list, which in most situations will give the same result:

    clang++ -stdlib=libc++ helloworld.cpp -lc++abi

Setting 2D position doesn't always make target position visible

When the position of the map view is set to a 2D location, the location of the virtual camera is placed directly above that position on the ground. If the camera is tilted off of the z-axis, the point in the center of the screen isn't the position that was set (and often the targeted position won't even be visible).

The simplest fix for this is to add a function that sets the "view focus" instead of just the position and let the library calculate the appropriate position for the camera.

@ecgreb Would this be useful?

gcc error for Raspberry pi

pi@raspberrypi ~/tangram-es $ export CXX=/usr/bin/g++-4.9
pi@raspberrypi ~/tangram-es $ make -j4 rpi
-- Platform chosen : RASPBERRYPI
-- Including raspberrypi dependent cmake file : /home/pi/tangram-es/toolchains/raspberrypi.cmake
CMake Error at toolchains/raspberrypi.cmake:14 (message):
Please install g++ version 4.8 or greater
Call Stack (most recent call first):
CMakeLists.txt:56 (include)

-- Configuring incomplete, errors occurred!
Makefile:172: recipe for target 'cmake-rpi' failed
make: *** [cmake-rpi] Error 1
pi@raspberrypi ~/tangram-es $ export CXX=/usr/bin/g++-4.8
pi@raspberrypi ~/tangram-es $ make rpi
-- Platform chosen : RASPBERRYPI
-- Including raspberrypi dependent cmake file : /home/pi/tangram-es/toolchains/raspberrypi.cmake
CMake Error at toolchains/raspberrypi.cmake:14 (message):
Please install g++ version 4.8 or greater
Call Stack (most recent call first):
CMakeLists.txt:56 (include)

-- Configuring incomplete, errors occurred!
Makefile:172: recipe for target 'cmake-rpi' failed
make: *** [cmake-rpi] Error 1
pi@raspberrypi ~/tangram-es $

Offline map data

May be this is a little bit early to ask, but still: I am authoring an open source Android map application and want to add true vector maps in it. But what I need is ability to work with offline map data. Are there any plans on this? I am eager to help with this but I am not familiar with C/C++.

raspberry pi 2 build error

Heya, trying to compile the package and I'm getting an error originating from
core/textbuffer.cpp
it goes into vcos_types.h saying expected ")" before sizeof statement on lines 151 and 201

had a look at the statements in that header file and they don't have any errors
gcc is version 4.9 and g++ is version 4.9, the CC and CXX were correctly set.

I followed all the build instructions to the letter, just wondering if this could be caused by a variable
not being set or something

Zooming doesn't focus on cursor when view is tilted

When the view is straight down, zooming will keep the mouse cursor (or gesture centroid) over the same place on the ground, which is nice! However as soon as the view is tilted, zooming will translate the view in an unexpected way (and doesn't keep the cursor over the same point).

Maintaining the zoom-focus behavior would be nice, but the implication of that for a tilted view is that zooming with the cursor over a distant point might cause a tremendous amount of translation! There's also the annoyance of handling the case of a cursor placed above the horizon (a problem we've had to deal with in panning as well).

Refactor label state machine

As induced by #465, there is some labels appearing and disappearing instantly; the label state machine should disallow some three steps transitions (which can be considered inconsistent as fading_in->visible->fading_out for example)

raspberry pi build error

pi@raspberrypi ~/tangram-es $ make rpi
-- Platform chosen : RASPBERRYPI
-- Including raspberrypi dependent cmake file : /home/pi/tangram-es/toolchains/raspberrypi.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/tangram-es/build/rpi
make[1]: Entering directory '/home/pi/tangram-es/build/rpi'
make[2]: Entering directory '/home/pi/tangram-es/build/rpi'
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
[ 33%] Built target yaml-cpp
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
[ 41%] Built target libtess2
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
[ 42%] Built target libcsscolorparser
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
[ 95%] Built target core
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
[ 96%] Building CXX object CMakeFiles/tangram.dir/rpi/src/main.cpp.o
/home/pi/tangram-es/rpi/src/main.cpp: In function ‘void onKeyPress(int)’:
/home/pi/tangram-es/rpi/src/main.cpp:98:52: error: too few arguments to function ‘void Tangram::handlePinchGesture(float, float, float, float)’
Tangram::handlePinchGesture(0.0,0.0,0.5);
^
In file included from /home/pi/tangram-es/rpi/src/main.cpp:15:0:
/home/pi/tangram-es/core/src/tangram.h:67:6: note: declared here
void handlePinchGesture(float _posX, float _posY, float _scale, float _velocity);
^
/home/pi/tangram-es/rpi/src/main.cpp:101:52: error: too few arguments to function ‘void Tangram::handlePinchGesture(float, float, float, float)’
Tangram::handlePinchGesture(0.0,0.0,2.0);
^
In file included from /home/pi/tangram-es/rpi/src/main.cpp:15:0:
/home/pi/tangram-es/core/src/tangram.h:67:6: note: declared here
void handlePinchGesture(float _posX, float _posY, float _scale, float _velocity);
^
CMakeFiles/tangram.dir/build.make:100: recipe for target 'CMakeFiles/tangram.dir/rpi/src/main.cpp.o' failed
make[3]: *** [CMakeFiles/tangram.dir/rpi/src/main.cpp.o] Error 1
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/tangram.dir/all' failed
make[2]: *** [CMakeFiles/tangram.dir/all] Error 2
make[2]: Leaving directory '/home/pi/tangram-es/build/rpi'
Makefile:113: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/pi/tangram-es/build/rpi'
Makefile:168: recipe for target 'rpi' failed
make: *** [rpi] Error 2
pi@raspberrypi ~/tangram-es $

Ensure disposal of GL resources is done on render thread

It is currently possible that the Scene may be disposed on a worker thread when a new scene is loaded while the previous is still held by a worker thread during processing.
In my opinion the best solution would be to use a custom deleter for unique_ and shared_ptrs for a classes that hold GL resources, where the deleter enqueues them for disposal on the render thread.

This (or another solution) will be necessary for scene reloading on Android

Text halo collisions for POI labels

Noticed this in Eureka, California but present just about everywhere.

Looks like each character's text halo is being calculated sequentially instead of all drawing at once before the text fill pass.

yXyXyX where X is fill, y is halo and the halo draws first, then the fill. Instead it' usually yyy then XXX.

It's not as bad for not bold text, letter spacing of bold text seems off, which is compounding this?

screenshot_2016-01-11-12-49-02
screenshot_2016-01-11-12-49-17
screenshot_2016-01-11-12-49-34

No label rendering on Samsung Galaxy SIII (Specifically when multisampling is set to true)

This is something specific to S3, where getting u_tex uniform position fails on sdf.fs fragment shader.

LogCat Output:

D/Tangram ( 3216): finish initialize
D/Tangram ( 3216): initialize
D/Tangram ( 3216): finish initialize
D/Tangram ( 3216): setup GL
D/Tangram ( 3216): resize: 720 x 1230
D/Tangram ( 3216): OpenGL Error: GL_INVALID_VALUE at Tangram::render()
D/Tangram ( 3216): Warning: Using default font for 'sans-serif_400_normal'.
D/Tangram ( 3216): OpenGL Error: GL_INVALID_VALUE at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()
D/Tangram ( 3216): OpenGL Error: GL_INVALID_OPERATION at Tangram::render()

Possible Issue: It seems like sdf shader is being too aggressively optimized, which might be causing pruning of the u_tex uniform from the shader.

make rpi and make clean-rpi rpi both fail

sudo apt-get update
pi@raspberrypi ~ $ sudo apt-get install cmake g++-4.7 libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
cmake is already the newest version.
g++-4.7 is already the newest version.
libcurl4-openssl-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
pi@raspberrypi ~ $ cd ~
pi@raspberrypi ~ $ git clone https://github.com/tangrams/tangram-es.git
fatal: destination path 'tangram-es' already exists and is not an empty directory.
pi@raspberrypi ~ $ git pull
fatal: Not a git repository (or any of the parent directories): .git
pi@raspberrypi ~ $ cd tangram-es
pi@raspberrypi ~/tangram-es $ git pull
Already up-to-date.
pi@raspberrypi ~/tangram-es $ git clean -n
pi@raspberrypi ~/tangram-es $ git submodule update
pi@raspberrypi ~/tangram-es $ git submodule init && git submodule update
Submodule 'core/include/libtess2/libtess2' () registered for path 'core/dependencies/tess2/libtess2'
Submodule 'core/include/fontstash-es' () registered for path 'core/include/fontstash-es'
Submodule 'core/include/glm' () registered for path 'core/include/glm'
pi@raspberrypi ~/tangram-es $ make clean-rpi rpi
rm -rf build/rpi
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Platform chosen : RASPBERRYPI
-- Including raspberrypi dependent cmake file : /home/pi/tangram-es/toolchains/raspberrypi.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/tangram-es/build/rpi
make[1]: Entering directory '/home/pi/tangram-es/build/rpi'
make[2]: Entering directory '/home/pi/tangram-es/build/rpi'
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
Scanning dependencies of target libtess2
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
[ 2%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/geom.c.o
[ 4%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/tess.c.o
[ 6%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/priorityq.c.o
[ 9%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/sweep.c.o
[ 11%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/dict.c.o
[ 13%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/bucketalloc.c.o
[ 15%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/mesh.c.o
Linking C static library ../../../lib/liblibtess2.a
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
[ 15%] Built target libtess2
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
Scanning dependencies of target core
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
make[3]: Entering directory '/home/pi/tangram-es/build/rpi'
[ 18%] Building CXX object core/CMakeFiles/core.dir/src/text/textBuffer.cpp.o
[ 20%] Building CXX object core/CMakeFiles/core.dir/src/text/fontContext.cpp.o
[ 22%] Building CXX object core/CMakeFiles/core.dir/src/util/mapProjection.cpp.o
[ 25%] Building CXX object core/CMakeFiles/core.dir/src/util/texture.cpp.o
[ 27%] Building CXX object core/CMakeFiles/core.dir/src/util/builders.cpp.o
[ 29%] Building CXX object core/CMakeFiles/core.dir/src/util/vertexLayout.cpp.o
[ 31%] Building CXX object core/CMakeFiles/core.dir/src/util/geoJson.cpp.o
[ 34%] Building CXX object core/CMakeFiles/core.dir/src/util/rectangle.cpp.o
[ 36%] Building CXX object core/CMakeFiles/core.dir/src/util/error.cpp.o
[ 38%] Building CXX object core/CMakeFiles/core.dir/src/util/shaderProgram.cpp.o
[ 40%] Building CXX object core/CMakeFiles/core.dir/src/util/geom.cpp.o
[ 43%] Building CXX object core/CMakeFiles/core.dir/src/util/vboMesh.cpp.o
[ 45%] Building CXX object core/CMakeFiles/core.dir/src/util/pbfParser.cpp.o
[ 47%] Building CXX object core/CMakeFiles/core.dir/src/data/dataSource.cpp.o
[ 50%] Building CXX object core/CMakeFiles/core.dir/src/data/geoJsonSource.cpp.o
[ 52%] Building CXX object core/CMakeFiles/core.dir/src/data/protobufSource.cpp.o
[ 54%] Building CXX object core/CMakeFiles/core.dir/src/tile/labels/label.cpp.o
[ 56%] Building CXX object core/CMakeFiles/core.dir/src/tile/labels/labelContainer.cpp.o
[ 59%] Building CXX object core/CMakeFiles/core.dir/src/tile/mapTile.cpp.o
[ 61%] Building CXX object core/CMakeFiles/core.dir/src/tile/tileManager.cpp.o
[ 63%] Building CXX object core/CMakeFiles/core.dir/src/tile/tileWorker.cpp.o
[ 65%] Building CXX object core/CMakeFiles/core.dir/src/style/polylineStyle.cpp.o
[ 68%] Building CXX object core/CMakeFiles/core.dir/src/style/style.cpp.o
[ 70%] Building CXX object core/CMakeFiles/core.dir/src/style/debugStyle.cpp.o
[ 72%] Building CXX object core/CMakeFiles/core.dir/src/style/polygonStyle.cpp.o
[ 75%] Building CXX object core/CMakeFiles/core.dir/src/style/debugTextStyle.cpp.o
[ 77%] Building CXX object core/CMakeFiles/core.dir/src/style/fontStyle.cpp.o
[ 79%] Building CXX object core/CMakeFiles/core.dir/src/view/view.cpp.o
/home/pi/tangram-es/core/src/view/view.cpp: In function âvoid scanLine(int, int, int, int, std::set&)â:
/home/pi/tangram-es/core/src/view/view.cpp:247:16: error: âclass std::setâ has no member named âemplaceâ
core/CMakeFiles/core.dir/build.make:675: recipe for target 'core/CMakeFiles/core.dir/src/view/view.cpp.o' failed
make[3]: *** [core/CMakeFiles/core.dir/src/view/view.cpp.o] Error 1
make[3]: Leaving directory '/home/pi/tangram-es/build/rpi'
CMakeFiles/Makefile2:112: recipe for target 'core/CMakeFiles/core.dir/all' failed
make[2]: *** [core/CMakeFiles/core.dir/all] Error 2
make[2]: Leaving directory '/home/pi/tangram-es/build/rpi'
Makefile:72: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/pi/tangram-es/build/rpi'
Makefile:160: recipe for target 'rpi' failed
make: *** [rpi] Error 2

Check why android x86 doesn't build

Its been long since we build android for x86 arch.

@karimnaaji tried to build x86 so that he can play with the intel gl debugger tool using genymotion, however x86 fails with the following:

CMake Error at toolchains/android.toolchain.cmake:639 (message):
  Specified ANDROID_ABI = "x86" is not supported by this cmake toolchain or
  your NDK/toolchain.

     Supported values are: "armeabi-v7a", "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP"

"make clean" shouldn't download things it doesn't need to

If you run make clean, it will go through the hoops of downloading and installing gradle and a bunch of apache projects in an attempt to clean a nonexistent android build (in my case, I had run make xcode). See attached screenshot.

screen shot 2015-12-23 at 11 52 40 am

pbf.hpp compilation workings on Linux

I ran into the following warnings when compiling on Linux (via make linux):

In file included from /home/sevko/dwn/tangram-es/core/src/util/pbfParser.h:7:0,
                 from /home/sevko/dwn/tangram-es/core/src/util/pbfParser.cpp:1:
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp: In member functionvoid protobuf::message::skipValue(uint64_t)’:
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp:202:73: warning: format ‘%lldexpects argument of typelong long int’, but argument 4 has typeuint64_t {aka long unsigned int}’ [-Wformat=]
             snprintf(msg, 80, "cannot skip unknown type %lld", val & 0x7);
                                                                         ^
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp:202:73: warning: format ‘%lldexpects argument of typelong long int’, but argument 4 has typeuint64_t {aka long unsigned int}’ [-Wformat=]

and

In file included from /home/sevko/dwn/tangram-es/core/src/util/pbfParser.h:7:0,
                 from /home/sevko/dwn/tangram-es/core/src/data/protobufSource.cpp:1:
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp: In member functionvoid protobuf::message::skipValue(uint64_t)’:
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp:202:73: warning: format ‘%lldexpects argument of typelong long int’, but argument 4 has typeuint64_t {aka long unsigned int}’ [-Wformat=]
             snprintf(msg, 80, "cannot skip unknown type %lld", val & 0x7);
                                                                         ^
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp:202:73: warning: format ‘%lldexpects argument of typelong long int’, but argument 4 has typeuint64_t {aka long unsigned int}’ [-Wformat=]

Here's the full build log, in case you wanted to see it:

~/dwn/tangram-es λ make linux
mkdir -p build/linux
cd build/linux &&\
        cmake ../.. -DPLATFORM_TARGET=linux
-- Platform chosen : LINUX
-- Including linux dependent cmake file : /home/sevko/dwn/tangram-es/toolchains/linux.cmake
-- checking for one of the modules 'glfw3'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sevko/dwn/tangram-es/build/linux
cd build/linux && \
        make
make[1]: Entering directory `/home/sevko/dwn/tangram-es/build/linux'
make[2]: Entering directory `/home/sevko/dwn/tangram-es/build/linux'
make[3]: Entering directory `/home/sevko/dwn/tangram-es/build/linux'
Scanning dependencies of target libtess2
make[3]: Leaving directory `/home/sevko/dwn/tangram-es/build/linux'
make[3]: Entering directory `/home/sevko/dwn/tangram-es/build/linux'
[  2%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/tess.c.o
[  4%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/priorityq.c.o
[  7%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/mesh.c.o
[  9%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/geom.c.o
[ 11%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/sweep.c.o
[ 14%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/bucketalloc.c.o
[ 16%] Building C object core/dependencies/tess2/CMakeFiles/libtess2.dir/libtess2/Source/dict.c.o
Linking C static library ../../../lib/liblibtess2.a
make[3]: Leaving directory `/home/sevko/dwn/tangram-es/build/linux'
[ 16%] Built target libtess2
make[3]: Entering directory `/home/sevko/dwn/tangram-es/build/linux'
Scanning dependencies of target core
make[3]: Leaving directory `/home/sevko/dwn/tangram-es/build/linux'
make[3]: Entering directory `/home/sevko/dwn/tangram-es/build/linux'
[ 19%] Building CXX object core/CMakeFiles/core.dir/src/text/fontContext.cpp.o
[ 21%] Building CXX object core/CMakeFiles/core.dir/src/text/textBuffer.cpp.o
[ 23%] Building CXX object core/CMakeFiles/core.dir/src/tile/tileManager.cpp.o
[ 26%] Building CXX object core/CMakeFiles/core.dir/src/tile/mapTile.cpp.o
[ 28%] Building CXX object core/CMakeFiles/core.dir/src/tile/tileWorker.cpp.o
[ 30%] Building CXX object core/CMakeFiles/core.dir/src/tile/labels/label.cpp.o
[ 33%] Building CXX object core/CMakeFiles/core.dir/src/tile/labels/labelContainer.cpp.o
[ 35%] Building CXX object core/CMakeFiles/core.dir/src/view/view.cpp.o
[ 38%] Building CXX object core/CMakeFiles/core.dir/src/util/rectangle.cpp.o
[ 40%] Building CXX object core/CMakeFiles/core.dir/src/util/mapProjection.cpp.o
[ 42%] Building CXX object core/CMakeFiles/core.dir/src/util/geoJson.cpp.o
[ 45%] Building CXX object core/CMakeFiles/core.dir/src/util/builders.cpp.o
[ 47%] Building CXX object core/CMakeFiles/core.dir/src/util/error.cpp.o
[ 50%] Building CXX object core/CMakeFiles/core.dir/src/util/shaderProgram.cpp.o
[ 52%] Building CXX object core/CMakeFiles/core.dir/src/util/texture.cpp.o
[ 54%] Building CXX object core/CMakeFiles/core.dir/src/util/geom.cpp.o
[ 57%] Building CXX object core/CMakeFiles/core.dir/src/util/vboMesh.cpp.o
[ 59%] Building CXX object core/CMakeFiles/core.dir/src/util/vertexLayout.cpp.o
[ 61%] Building CXX object core/CMakeFiles/core.dir/src/util/pbfParser.cpp.o
In file included from /home/sevko/dwn/tangram-es/core/src/util/pbfParser.h:7:0,
                 from /home/sevko/dwn/tangram-es/core/src/util/pbfParser.cpp:1:
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp: In member functionvoid protobuf::message::skipValue(uint64_t)’:
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp:202:73: warning: format ‘%lldexpects argument of type ‘long long int’, but argument 4 has typeuint64_t {aka long unsigned int}’ [-Wformat=]
             snprintf(msg, 80, "cannot skip unknown type %lld", val & 0x7);
                                                                         ^
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp:202:73: warning: format ‘%lldexpects argument of type ‘long long int’, but argument 4 has typeuint64_t {aka long unsigned int}’ [-Wformat=]
[ 64%] Building CXX object core/CMakeFiles/core.dir/src/style/fontStyle.cpp.o
[ 66%] Building CXX object core/CMakeFiles/core.dir/src/style/style.cpp.o
[ 69%] Building CXX object core/CMakeFiles/core.dir/src/style/polylineStyle.cpp.o
[ 71%] Building CXX object core/CMakeFiles/core.dir/src/style/polygonStyle.cpp.o
[ 73%] Building CXX object core/CMakeFiles/core.dir/src/tangram.cpp.o
[ 76%] Building CXX object core/CMakeFiles/core.dir/src/scene/light.cpp.o
[ 78%] Building CXX object core/CMakeFiles/core.dir/src/scene/material.cpp.o
[ 80%] Building CXX object core/CMakeFiles/core.dir/src/scene/scene.cpp.o
[ 83%] Building CXX object core/CMakeFiles/core.dir/src/scene/directionalLight.cpp.o
[ 85%] Building CXX object core/CMakeFiles/core.dir/src/scene/spotLight.cpp.o
[ 88%] Building CXX object core/CMakeFiles/core.dir/src/scene/pointLight.cpp.o
[ 90%] Building CXX object core/CMakeFiles/core.dir/src/data/protobufSource.cpp.o
In file included from /home/sevko/dwn/tangram-es/core/src/util/pbfParser.h:7:0,
                 from /home/sevko/dwn/tangram-es/core/src/data/protobufSource.cpp:1:
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp: In member functionvoid protobuf::message::skipValue(uint64_t)’:
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp:202:73: warning: format ‘%lldexpects argument of type ‘long long int’, but argument 4 has typeuint64_t {aka long unsigned int}’ [-Wformat=]
             snprintf(msg, 80, "cannot skip unknown type %lld", val & 0x7);
                                                                         ^
/home/sevko/dwn/tangram-es/core/include/pbf/pbf.hpp:202:73: warning: format ‘%lldexpects argument of type ‘long long int’, but argument 4 has typeuint64_t {aka long unsigned int}’ [-Wformat=]
[ 92%] Building CXX object core/CMakeFiles/core.dir/src/data/geoJsonSource.cpp.o
[ 95%] Building CXX object core/CMakeFiles/core.dir/src/data/dataSource.cpp.o
Linking CXX static library ../lib/libcore.a
make[3]: Leaving directory `/home/sevko/dwn/tangram-es/build/linux'
[ 95%] Built target core
make[3]: Entering directory `/home/sevko/dwn/tangram-es/build/linux'
Scanning dependencies of target tangram
make[3]: Leaving directory `/home/sevko/dwn/tangram-es/build/linux'
make[3]: Entering directory `/home/sevko/dwn/tangram-es/build/linux'
[ 97%] Building CXX object CMakeFiles/tangram.dir/linux/src/platform_linux.cpp.o
[100%] Building CXX object CMakeFiles/tangram.dir/linux/src/main.cpp.o
Linking CXX executable bin/tangram
make[3]: Leaving directory `/home/sevko/dwn/tangram-es/build/linux'
[100%] Built target tangram
make[2]: Leaving directory `/home/sevko/dwn/tangram-es/build/linux'
make[1]: Leaving directory `/home/sevko/dwn/tangram-es/build/linux'

GL context loss make labels disappear

Related to issue mapzen/eraser-map#116
Labels disappear after a GL context loss, all GL resources are re-uploaded, but labels/sprites need to be updated at least once in order to go into their animation/request-render loop.
To fix this we should require Tangram to perform at least one update to get labels back to their visible states.
Easy to reproduce after destroying the context on OS X.

"make linux" fails to compile

ubuntu version: 15.10
gcc version: 5.2

err:
core/src/data/clientGeoJsonSource.cpp:77:98: error: no matching function for call to 'std::mapstd::__cxx11::basic_string<char, std::__cxx11::basic_string >::map()'

thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.