Ansis Brammanis
d34f8eb674
[core][ios][osx][android] make SpriteImage accept PremultipliedImage
...
the SpriteImage constructor signature changes from
SpriteImage(
uint16_t width, uint16_t height, float pixelRatio,
std::string&& data, bool sdf = false);
to
SpriteImage(PremultipliedImage&&, float pixelRatio, bool sdf = false)
2016-01-19 18:23:21 -08:00
Thiago Marcos P. Santos
7ad9e47bbe
[glfw] Fix panning direction
...
Follow-up of the transform refactoring
2016-01-19 11:36:26 +02:00
Minh Nguyễn
47b69100f9
[core, ios, osx, android, glfw] Flipped origin of Map::latLngForPixel(), Map::pixelForLatLng()
...
Map and Transform methods assume an origin at the top-left corner of the view, like iOS, Android, and GLFW but unlike OS X. Transform is responsible for flipping coordinates between the top-left origin of Map and the bottom-left origin of TransformState.
Fixes #3574 .
2016-01-18 16:54:58 -08:00
Bruno de Oliveira Abinader
20d2ceef4b
[osx] Use framebuffer width/height in GLFW port
...
Framebuffer width/height takes pixel ration in consideration.
Part of #3294 .
2015-12-18 15:31:36 -08:00
Thiago Marcos P. Santos
a903d2eef0
[glfw] Set viewport size from the Map thread
...
Setting the viewport size from the main thread has no affect
on Linux and thus, the map doesn't scale. We now set the
viewport size on the beforeRender() hook that gets called
from the Map thread.
2015-12-16 17:18:54 -08:00
Konstantin Käfer
4fc8226838
[core] allow changing the orientation
...
You can now change the orientation of north to be to the right, bottom, left in addition to the default of top
2015-12-15 11:41:58 -08:00
Konstantin Käfer
93c000dd18
[core] viewport is handled by embedding applications
2015-12-10 14:16:11 -08:00
Konstantin Käfer
d5fb535058
[core] add namespace comment to closing brace
2015-12-03 15:38:36 +01:00
John Firebaugh
8afa14fa78
[core] Map::setSprite ⇢ Map::addAnnotationIcon
...
Fixes #3084
2015-12-01 15:10:28 -08:00
John Firebaugh
622f6691b7
[glfw] No longer necessary to wait for style load to add default marker
2015-12-01 09:15:05 -08:00
John Firebaugh
12fc949006
[tests] Don't use icons from the style for annotations
2015-11-30 12:40:09 -08:00
Bruno de Oliveira Abinader
92856f394c
[core] Collision debug is now MapDebugOptions::Collision
2015-11-27 17:47:02 +02:00
Bruno de Oliveira Abinader
1f0820c8e8
[core] Added MapDebugOptions
...
Map debug options are now cycled up to all debug options enabled, then
back to none.
2015-11-27 17:47:02 +02:00
Justin R. Miller
ac10cc1ecd
fixes #3054 : move desktop test app keybindings output to startup log
2015-11-17 12:00:51 -08:00
Konstantin Käfer
85ab48636c
[core] allow changing pitch in GLFW based apps
2015-11-17 19:02:12 +01:00
John Firebaugh
1e350b7ea4
[core] Reorganize sprite related files
2015-11-12 13:03:14 -08:00
Bruno de Oliveira Abinader
5a24ac605b
[core] Use PrecisionPoint in zoom and angle functions
2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
c78e769635
[core] Use PrecisionPoint in coordinate functions
2015-11-11 16:59:49 +02:00
John Firebaugh
54e08b1f83
[core] Eliminate use of ClassProperties for paint
2015-11-10 11:33:17 -08:00
Ansis Brammanis
750c72f324
improve gestures in perspective view
...
The location under your finger stays under your finger as you pan.
The location you double tap to zoom stays at the same point.
The location at the center of a pinch zoom stays at the center.
The location at the center of a rotation stays at the center.
2015-10-26 12:48:03 -07:00
Konstantin Käfer
75dec6ffac
[core] always reparse with the freshest possible placement config
...
Fixes an issue where updates to stale tiles would remove labels altogether until the map was rotated.
2015-10-26 16:44:55 +01:00
John Firebaugh
3afc8b4a29
[core] Introduce StyleLayer subclasses
2015-10-22 09:34:40 -07:00
John Firebaugh
df89de5cc5
[core] Rationalize style property classes: <type>{Paint,Layout}Properties
2015-10-22 09:21:30 -07:00
Bruno de Oliveira Abinader
0ff7cf20e9
Get rid of MapData::{get,set}NeedsRepaint
2015-09-02 23:20:47 +03:00
Bruno de Oliveira Abinader
0b501e0566
Substitute nudgeTransitions with async view invalidation
2015-09-02 23:20:46 +03:00
Mike Morris
4540c3c0e8
View::swap -> View::beforeRender View::afterRender
...
To be able to resize the framebuffer on the map thread
in HeadlessView.
2015-08-25 14:39:49 -04:00
Konstantin Käfer
aa06a9d587
query the monitor's resolution instead of forcing 1024x768
2015-08-11 16:40:40 +03:00
Konstantin Käfer
21ec505648
add benchmark mode that shows the real frame time rather than the vsync time
2015-08-11 16:40:40 +03:00
Bruno de Oliveira Abinader
fa4636ffe4
Map::nudgeTransitions no longer depends on client information
...
Clients no longer need to provide data (eg. if gesturing or in a custom
animation) to Map::nudgeTransitions().
Upon MapContext::renderSync(), a new atomic bool 'needsRepaint' in MapData
allows thread-safe communication between Map and MapContext.
2015-08-05 15:19:00 +03:00
Bruno de Oliveira Abinader
492bcf0bd7
Added Update::Repaint
2015-08-05 15:19:00 +03:00
Konstantin Käfer
78ec33320f
don't use certain STL functions
...
some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
2015-08-04 14:08:19 +02:00
Bruno de Oliveira Abinader
5e2f3b1323
Avoid nudging transitions if a gesture is in progress #2
...
Following the same steps from #1548 and #1912 for GLFW and iOS ports.
Also removed a redundant check if transform state is changing since
we're already dealing with that.
2015-07-27 21:57:51 +03:00
Bruno de Oliveira Abinader
0b8cd02c19
GLFW port now uses nudgeTransitions()
2015-07-20 21:59:13 +03:00
Thiago Marcos P. Santos
bd8210d5a1
Remove unused function: elapsed()
2015-07-11 12:42:45 +03:00
Konstantin Käfer
62ac43a85b
add ability to add random custom markers to test app
2015-07-08 19:46:02 +02:00
Konstantin Käfer
675ddddee7
Make pixelRatio constant across a Map object lifetime
...
also moves framebuffer size out of TransformState into its own object
2015-07-08 10:40:05 +02:00
John Firebaugh
42c06e7039
Use array of structs rather than parallel arrays for annotations
2015-06-29 10:54:17 -07:00
Konstantin Käfer
84e2ea886d
drive map rendering from main thread
2015-06-26 10:32:06 -07:00
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