John Firebaugh
e5181e2668
[core] Use optional where SpriteAtlas return values might not exist
...
Fixes #3162
2015-12-01 18:05:54 -08:00
John Firebaugh
1e350b7ea4
[core] Reorganize sprite related files
2015-11-12 13:03:14 -08:00
John Firebaugh
54e08b1f83
[core] Eliminate use of ClassProperties for paint
2015-11-10 11:33:17 -08:00
Bruno de Oliveira Abinader
5ef5d08867
[core] Reset GL values when needed
2015-11-06 20:05:01 +02:00
Bruno de Oliveira Abinader
8894982625
[core] Use GL_TRUE/GL_FALSE instead of true/false
2015-11-06 20:05:01 +02:00
Konstantin Käfer
8e63084c9e
[core] Move remaining GL state from Painter into GLConfig object
2015-11-04 13:38:51 +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
Ansis Brammanis
d50ade7aa4
improve dashed and patterned line antialiasing
...
in perspective view. This is exactly the same approach used for regular
lines. I just forgot to implement it for these types of lines.
2015-08-27 17:42:27 -04:00
Ansis Brammanis
9e68e49c89
fix depth clipping in perspective view
...
The depth range is now set slightly differently. Both ends of the range
are shifted for each layer to solve some precision issues.
Some layers draw multiple things at different depths. For example, fill
layers draw fills and antialiasing separately. To handle this case, I
added setDepthSublayer(n) which a
2015-08-24 18:41:51 -04:00
Ansis Brammanis
3027f8c0aa
port line rendering fixes for perspective views
2015-08-24 18:41:50 -04: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
58b93553c1
Replace size() with empty() whenever possible
...
Before C++11, std::list's implementation of size was O(n). It should be
all O(1) now, but it is probably still a good idea to use empty() to
emphasize the intend.
2015-07-29 11:03:47 +03:00
Bruno de Oliveira Abinader
0ea8a37cb0
Unify default transition values in MapData
...
Relevant changes:
- Added 'defaultFadeDuration' and 'defaultTransitionDelay' to MapData;
- Painter & StyleParser now receives a reference to MapData;
- As previously seen on the code: 300ms is the default fade duration
and 0ms is the default transition duration;
- We no longer pass the current time point to Style, since it now uses
MapData.animationTime, which gets updated in MapContext::update().
- Updated StyleParser check to use a mock MapData;
2015-07-14 16:58:32 +03: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
Ansis Brammanis
9c03b396c0
Merge remote-tracking branch 'origin/master' into HEAD
...
Conflicts:
src/mbgl/renderer/painter_fill.cpp
2015-06-03 19:20:41 -04:00
John Firebaugh
ec06bb7e3c
Merge ResourceLoader into Style and move atlas ownership
2015-06-01 13:22:02 -07:00
Ansis Brammanis
1e044a175c
Reparse tiles when zoom level > source maxzoom
...
so that layout property functions are applied correctly
and so that label placement is redone
js:
https://github.com/mapbox/mapbox-gl-js/pull/1005
and
440bc02505
2015-05-28 19:17:07 -04:00
Konstantin Käfer
72964f5bef
only update GL state when it actually changed
2015-05-04 17:33:05 +02:00
Konstantin Käfer
839b19330e
remove hasData() from Bucket interface
2015-05-04 17:33:04 +02:00
Konstantin Käfer
dae18cc7bc
remove some unused includes
2015-04-28 14:32:21 -04:00
Konstantin Käfer
c88a60b1e5
remove unused includes
2015-04-28 14:32:18 -04:00
Ansis Brammanis
f1edce8e21
remove linejoin shader
...
The previous commit switched to using triangles for drawing round joins.
2015-04-27 11:44:49 +02:00
John Firebaugh
d8411f26d2
Tile::ID ⇢ TileID
...
This allows making both Tile and TileID private.
2015-04-06 13:58:56 -07:00
John Firebaugh
3d9b441c8b
Eliminate some unnecessary pointer indirection
...
Buckets had a pointer to the associated layout type, when they can just
have a direct member.
2015-03-31 15:23:40 -07:00
Ansis Brammanis
31a3d3603c
clip fill antialiasing with depth buffer to avoid overlapping
...
https://github.com/mapbox/mapbox-gl-native/pull/381
2015-03-24 16:08:26 -07:00
John Firebaugh
0c985c024b
Revert "Move atlas ownership to Style"
...
This reverts commit bffee07154 .
2015-03-13 13:05:32 -07:00
John Firebaugh
bffee07154
Move atlas ownership to Style
...
This follows gl-js and just makes sense -- whenever the style changes
the atlases should be blown away.
Refs #957
2015-03-13 10:55:47 -07:00
Konstantin Käfer
0151fe6c01
pass StyleLayer objects as const ref instead of a shared pointer
2015-03-06 13:26:11 +01:00
Konstantin Käfer
c07fa06994
rename StyleBucket* => StyleLayout*
...
and remove a few unused variables
refs #881
2015-02-17 18:27:51 -08:00
Konstantin Käfer
89c0ff5f39
make StyleBucket mutable
...
refs #881
2015-02-17 18:27:51 -08:00
Ansis Brammanis
4ec0028856
switch from low/high to from/to
2015-02-04 12:08:29 -08:00
Ansis Brammanis
6f5c6b58b4
use faded pattern functions for dasharrays
2015-02-02 17:57:12 -08:00
Ansis Brammanis
322f46a5db
implement functions for line-image
2015-02-02 17:57:12 -08:00
Ansis Brammanis
47966a1431
make line-opacity work with line-image
...
js: 0e9a86e3553913abb8ebb3d8926e2b99db8d4008
2015-01-30 11:02:26 -08:00
Ansis Brammanis
60035d7728
Merge branch 'no-crossfade'
...
Conflicts:
src/mbgl/renderer/painter_line.cpp
2015-01-26 12:19:40 -08:00
Ansis Brammanis
8f620bed8a
reduce gamma for dashes to make them sharper
...
because the shader uses the range [0.5 - gamma, 0.5 + gamma] gamma
should be half the distance you want to blur, not the full distance.
js: 35b42808922506a6039b8bfd3dc10098692c1268
2015-01-23 19:56:26 -05:00
Ansis Brammanis
5955ac3493
transition dashes when resetting their stretch
...
Dash patterns stretch from one integer zoom until the
next integer zoom where they reset. This transitions
those resets.
js: be5c7184bfd8cc9d47299041eb7fadbd41f6f6f0
2015-01-23 17:25:31 -05:00
Ansis Brammanis
d0d33a3ee7
don't permanently crossfade line patterns
...
js: a2e8527b4023d19fa0c58130a105aaf283f4b152
2015-01-23 17:12:41 -05:00
Ansis Brammanis
4f827c21c6
implement round dash caps
2015-01-14 22:56:44 -05:00
Ansis Brammanis
2c615b613c
support dash arrays that are any length
2015-01-14 22:24:44 -05:00
Ansis Brammanis
8bfaf12793
remove old dash support from line shader
2015-01-14 21:11:19 -05:00
Ansis Brammanis
2643a0efc7
start porting dash lines from js
...
- switches to dash units that are scaled by line width
- adds a lineatlas to store patterns line dashed lines
- adds linesdf shader which renders line fill from the lineatlas
js: 8e83d76af3bd877eb9639c02e296363e2c0186f8
2015-01-14 20:56:18 -05:00
Ansis Brammanis
166a3e21fa
rephrase line uniform calculations to match js
...
js: 359a576471e20373333cae80a5eccda95ee4cdc2
2015-01-08 14:40:19 -05:00
Konstantin Käfer
bec97a3d40
warp in MBGL_CHECK_ERROR() call
2014-12-12 12:37:55 +01:00
Konstantin Käfer
febfb7ac09
fix rendering errors
2014-12-12 12:37:55 +01: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
Konstantin Käfer
abafb52f37
make most headers private
2014-12-04 20:02:50 +01:00