Commit Graph

64 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
1f12bcee90 Support shape annotations on GLFWView
Add different random triangles count by using the keys 7, 8, 9 or 0.
Q will clear all the annotations.
W will remove one annotation.
2015-06-18 13:39:18 +03:00
Minh Nguyễn
714b68f7b3 Revert "use array of structs rather than parallel arrays for annotations"
This reverts commit 2435c1ad26 (#1710), which needs to be revisited in light of #1655, which is a much higher priority at the moment.
2015-06-15 15:58:22 -07:00
Konstantin Käfer
2435c1ad26 use array of structs rather than parallel arrays for annotations 2015-06-11 17:26:37 -04:00
Konstantin Käfer
0c5f8a2c59 press 1 through 6 to add 10^(n-1) points in the current viewport
(only works correctly when rotated to north, but this is a just a debug functionality anyway)
2015-06-09 10:29:07 -04:00
Ansis Brammanis
8962442b1b make collision debug boxes toggleable 2015-05-28 19:17:07 -04:00
John Firebaugh
7d4f12434e Ensure call-once semantics inside InitializeExtensions 2015-05-13 19:01:58 -07:00
John Firebaugh
a2344c36c3 Extensible GL extension support 2015-05-13 19:01:58 -07:00
John Firebaugh
0f7c6b0b52 Remove unused GL feature flags
These were used only for prerendered textures, which were removed.
2015-05-13 19:01:57 -07:00
Konstantin Käfer
7dbe768ffc change the window title to indicate the current style 2015-05-07 11:01:15 +02:00
Thiago Marcos P. Santos
769364c117 Make all GLFWView attributes private 2015-05-07 11:01:15 +02:00
Thiago Marcos P. Santos
168d7c4f17 Add style change functionality to the Linux test app
Makes the life of people using Linux as development environment way
easier.

Just press 's' to cycle through 3 different styles.
2015-05-07 11:01:15 +02:00
Konstantin Käfer
72964f5bef only update GL state when it actually changed 2015-05-04 17:33:05 +02:00
John Firebaugh
3bf0bf9538 Remove unused includes 2015-04-28 14:32:25 -04:00
John Firebaugh
a625ba8a09 Remove Map::start/stop
Both Android and iOS now use pause/resume. The map thread is
always running, and be able to receive messages. When paused,
it will just refuse to render.
2015-04-28 14:32:24 -04:00
John Firebaugh
6c7a01a503 Following kkaefer's view changes 2015-04-28 14:32:22 -04:00
Konstantin Käfer
dae18cc7bc remove some unused includes 2015-04-28 14:32:21 -04:00
Konstantin Käfer
b0a30943b4 move most private Map code to MapContext 2015-04-28 14:32:20 -04:00
John Firebaugh
12c07b916b Rework easing transition code
This brings the easing transition code a bit closer to how easings work
in gl-js. Instead of having an array of individual transitions for scale,
rotate, and pan, there is a single transition function that does all the
required calculations. This permits us to:

* Eliminate the "timeout" transition. (Fixes #126)
* Replace start/stopPanning() et al with setGestureInProgress(). Apps or
  SDKs are expected to make paired calls to setGestureInProgress(). This
  state will be ORed with the active easing state to determine when to
  use texture interpolation. (Fixes #79)
* Run style recalculations only when an ease transition that affects the
  zoom is in progress. (Fixes #1155)
2015-04-02 16:12:29 -07:00
Thiago Marcos P. Santos
490c172b35 Delete the GLFWView object at exit
Also destroy the glfwWindow we create. This leak was probably harmless
but a nice cleanup helps us debug other serious memory leaks.
2015-03-20 14:38:08 +02:00
Thiago Marcos P. Santos
124b49562d Get rid of printf and cout by using Log::*
Use our logging system that will route the message accordingly on
the target platform.

Fixes #613
2015-03-12 14:19:32 +02:00
Konstantin Käfer
47ede853c4 fixes black flicker on rotating the device
fixes #838

instead of rendering ad libitum on the map thread, we are now driving rendering from the UI thread on iOS via the map.renderSync() function. There are still white bars during the rotation, but the general content of the view is kept visible.

- upgrades GLFW to 3.1
- removes swapped/needsSwap in favor of a more explicit scheme
- View#invalidate() now replaces View#swap() and is called whenever the View needs to trigger a rerender. GLFW and Android to this right away, while iOS goes back to the main thread and does the Map redrawing as part of the GLKView update
- sets all iOS deployment targets to 7.0
- disables SQLite3 version check, since the library version changed on iOS 8.2
2015-03-12 12:16:38 +01:00
Konstantin Käfer
e8389d82cd guard against concurrent OpenGL extension loading 2015-03-06 15:42:34 +01:00
Konstantin Käfer
fb44fc81bd make Map::resize() private
they can only be called by View::resize
2015-03-06 13:52:25 +01:00
Leith Bade
89bbd29278 Use std::chrono 2015-02-04 09:39:25 +11:00
Leith Bade
aaedd9c83b Remove program binary caching 2015-01-27 12:38:40 +11:00
Leith Bade
016c2948c5 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	src/mbgl/map/map.cpp
2015-01-18 16:33:39 +11:00
Leith Bade
d950e986b7 Merge pull request #757 from mapbox/move-terminate
Move terminate() call to GLFWView to avoid problems with node
2015-01-16 10:16:30 +11:00
Leith Bade
5e44256fe8 Move terminate() call to GLFWView to avoid problems with node 2015-01-16 09:50:05 +11:00
John Firebaugh
d24b73b1a6 Move class state to map
https://github.com/mapbox/mapbox-gl-js/pull/936
2015-01-14 17:43:44 -08:00
Leith Bade
7cce089d78 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason 2015-01-13 19:48:26 +11:00
Leith Bade
f20a17a291 Merge pull request #748 from mapbox/fix-swap
Correctly handle swapping
2015-01-13 09:23:28 +11:00
Leith Bade
f05a530529 Correctly handle swapping. Fixes #666 2015-01-12 13:50:00 +11:00
Leith Bade
6aee86d5ff Correctly call resize with width and height. Fixes #746 2015-01-12 13:30:40 +11:00
Leith Bade
5ed8d4544f Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason 2015-01-09 09:30:52 +11:00
John Firebaugh
c32f7dfa88 Merge branch 'master' into shader-performance 2015-01-07 15:15:11 -08:00
Leith Bade
ff3ea3e20b Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	platform/default/glfw_view.cpp
	platform/default/headless_view.cpp
	src/mbgl/map/map.cpp
2014-12-23 11:33:26 +13:00
Leith Bade
0771e50460 Rename View functions to match conventions. Also tidy up view classes and remove C style casts. Closes #656 2014-12-23 09:29:45 +13:00
Leith Bade
df19683b6a Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	Makefile
	platform/default/headless_view.cpp
	src/mbgl/map/map.cpp
2014-12-21 15:02:47 +13:00
Leith Bade
15b47197a7 Use iostream for saving GL program binary. Also check for GL_NUM_PROGRAM_BINARY_FORMATS > 0. 2014-12-20 15:08:06 +13:00
Konstantin Käfer
abf702046b use correct enum 2014-12-12 12:37:55 +01:00
Leith Bade
d599fc5504 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	platform/default/glfw_view.cpp
	platform/default/headless_view.cpp
	src/mbgl/renderer/painter.cpp
	src/mbgl/renderer/prerendered_texture.cpp
2014-12-11 00:09:26 +11:00
Konstantin Käfer
93d56294cf update error reporting function 2014-12-10 13:21:08 +01:00
Leith Bade
0808485453 Use CHECK_ERROR on every GL call 2014-12-10 21:57:34 +11:00
Leith Bade
6bb1a5a146 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	include/mbgl/platform/default/headless_view.hpp
	platform/default/glfw_view.cpp
	platform/default/headless_view.cpp
2014-12-10 19:22:25 +11:00
Leith Bade
d2792e2987 Tidy up HeadlessView 2014-12-09 21:47:30 +11:00
Leith Bade
886b622a92 Add pakced depth stencil to GLFWView and HeadlessView 2014-12-07 00:40:44 +11:00
Leith Bade
b534520d6c Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	include/mbgl/platform/gl.hpp
	src/mbgl/platform/gl.cpp
	src/mbgl/shader/shader.cpp
2014-12-07 00:29:20 +11:00
Leith Bade
6df4e4a52c Load program binary extension on Linux 2014-12-06 14:21:08 +11:00
Leith Bade
de9eb00276 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	.gitignore
	gyp/mbgl-ios.gypi
	gyp/mbgl-linux.gypi
	gyp/mbgl-osx.gypi
	include/mbgl/map/map.hpp
	src/mbgl/map/map.cpp
	src/mbgl/storage/caching_http_file_source.cpp
2014-12-05 23:16:49 +11:00
John Firebaugh
0a942b6f14 Change Map::stop to use std::function<void()>
Fixes #685
2014-12-04 15:58:04 -08:00