John Firebaugh
540c6eca15
[core] Eliminate StyleBucket
2015-10-30 11:19:28 -07:00
Bruno de Oliveira Abinader
54858dae8c
[core] Added save/restore capabilities to GL config
2015-10-22 16:02:39 -07:00
Bruno de Oliveira Abinader
a1c53d92e5
[core] Added stencilOp, depthFunc and blendFunc to GL config
...
All GL values are now reset upon Painter setup.
2015-10-22 16:02:39 -07: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
6824a24acd
[core] Removed time param from Painter::render
...
Animation time can be obtained directly from MapData.
2015-10-21 11:20:45 -07:00
Bruno de Oliveira Abinader
0045eef00a
[core] Moved Painter::setup() to Painter ctor
2015-10-21 11:20:39 -07:00
Bruno de Oliveira Abinader
ad3078e73d
[core] Remove redundant setDebug() from Painter
...
This information can be obtained directly from MapData.
2015-10-21 11:20:20 -07:00
Konstantin Käfer
e3d9fb1715
[core] only show parent XOR child tiles
...
Since label rendering isn't clipped, having a parent tile, and only a handful of child tiles loaded may result in some labels being rendered twice (from the parent tile, and the up to three child tiles that necessitate the parent tile remaining in the list). This patch makes sure that in one location, it only ever renders one set of labels, by favoring the parent tile until all required child tiles have been loaded.
2015-10-12 14:46:47 +02:00
Justin R. Miller
999b0d2c75
refs #2527 , fixes #774 : properly unbind VAO
2015-10-05 16:23:13 -07:00
Bruno de Oliveira Abinader
a3ea4acb7c
[core] convert remaining types to use OpenGL header defined variants
2015-09-15 13:22:07 +02:00
Bruno de Oliveira Abinader
c33a6bddc6
[core] GL types for buckets, textures, buffers
2015-09-15 13:22:04 +02:00
Minh Nguyễn
0e456940b9
Merge branch 'master' into perspective-without-y-flip
2015-08-25 14:13:16 -07:00
Bruno de Oliveira Abinader
765c4695d8
Revert "only update the render order array when there are changes to tiles"
...
This reverts commit fd98607c5f .
Fixes #2163 .
2015-08-25 11:36:10 -07:00
Ansis Brammanis
51c93867ae
fix LatLng --> point for perspective views
2015-08-24 18:41:51 -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
0d68c4fedf
load correct covering tiles in perspective view
...
port pointCoordinate from -js to convert screen points to tile
coordinates correctly in perspective view.
2015-08-24 18:41:51 -04:00
Ansis Brammanis
494489f9a0
fix symbol rendering in perspective view
2015-08-24 18:41:50 -04:00
Ansis Brammanis
8d22e2bf01
port perspective projection matrix from -js
2015-08-24 18:41:50 -04:00
John Firebaugh
0451aca37e
Merge branch 'v8'
2015-08-24 10:47:30 -07:00
Konstantin Käfer
e2fadf3157
don't clip glyphs with the frustum
2015-08-21 14:16:43 -04:00
Konstantin Käfer
fd98607c5f
only update the render order array when there are changes to tiles
2015-08-20 16:13:46 -04:00
Konstantin Käfer
038b65eded
move RenderPass check to the StyleLayer object
2015-08-20 16:13:45 -04:00
Bruno de Oliveira Abinader
98534631e0
Add circle render type
...
As specified in:
https://github.com/mapbox/mapbox-gl-style-spec/blob/v8-circle/reference/v8.json
Part of #1740 .
2015-08-20 11:59:07 -07:00
Ansis Brammanis
19d42acc84
remove unused gaussian shader
2015-08-20 11:38:56 -04:00
Konstantin Käfer
d400fe0c91
use glClear to draw solid background fills
2015-08-19 18:49:36 -04:00
Konstantin Käfer
bb0ae37c25
disable debugging groups in non-debug builds
...
Use a macro to completely remove all instantiations of mbgl::gl::debugging::group so that we aren't executing the code to generate the arguments to the object instantiation
2015-08-19 18:21:12 -04: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
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
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
Bruno de Oliveira Abinader
2aad2f4e14
Pass {Duration,TimePoint} by const ref if possible
2015-07-14 16:48:34 +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
John Firebaugh
c357ce540a
Use unique_ptr for Source objects ( fixes #904 )
2015-07-02 12:55:53 -07:00
John Firebaugh
0cce08b67b
Change StyleBucket::source to indirect reference
...
This eliminates a reference loop: VectorTileData holds StyleLayers which
hold StyleBuckets which held Sources which hold VectorTileDatas. This
breaks the StyleBucket -> Source link in favor of manually resolving the
reference where necessary.
2015-06-18 13:39:18 +03:00
Bruno de Oliveira Abinader
ff0e54f35a
Cleaned up #defines for BUFFER_OFFSET
2015-06-18 09:48:34 +03: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
ff6a5ce5bc
Merge remote-tracking branch 'origin/master' into new-labelling
...
Conflicts:
src/mbgl/map/source.cpp
src/mbgl/map/source.hpp
src/mbgl/map/tile_data.cpp
src/mbgl/map/tile_parser.cpp
src/mbgl/map/vector_tile_data.cpp
src/mbgl/renderer/painter.cpp
src/mbgl/renderer/symbol_bucket.cpp
src/mbgl/text/glyph.hpp
src/mbgl/text/glyph_store.cpp
src/mbgl/text/placement.cpp
test/suite
2015-05-28 20:01:15 -04: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
f4707f72e0
Replace mbgl::util::make_unique<> with std::make_unique<>
2015-05-26 17:57:38 +02:00
Ansis Brammanis
7abd7950c9
Merge branch 'master' into new-labelling
...
Conflicts:
src/mbgl/map/tile_parser.cpp
src/mbgl/map/tile_parser.hpp
src/mbgl/renderer/painter.hpp
src/mbgl/renderer/painter_symbol.cpp
src/mbgl/renderer/symbol_bucket.cpp
src/mbgl/renderer/symbol_bucket.hpp
src/mbgl/text/collision.cpp
src/mbgl/text/collision.hpp
src/mbgl/text/placement.cpp
2015-05-19 11:09:33 -04:00
John Firebaugh
63ea3d4bef
Don't crash if VAO extensions are not available
...
Fixes #1585
2015-05-18 16:47:20 -07:00
John Firebaugh
83a5aae6c5
Render translucent background layers ( fixes #1514 )
2015-05-15 12:17:32 -07:00
John Firebaugh
a2344c36c3
Extensible GL extension support
2015-05-13 19:01:58 -07:00
Thiago Marcos P. Santos
41d619771e
Make the state attribute private
...
Also add a virtual setState() method to give subclasses a chance
to intercept the change of state. This will be used by VectorTileData
to release resources when the TileData becomes immutable.
2015-05-13 09:58:19 +02:00
John Firebaugh
76b922453a
Set correct strata for background render
...
Fixes #1478
2015-05-12 10:50:36 +02:00
Konstantin Käfer
63bb10a06b
apply the framebuffer size before calling updateMatrices()
2015-05-05 11:16:02 +02:00
Konstantin Käfer
72964f5bef
only update GL state when it actually changed
2015-05-04 17:33:05 +02:00
Konstantin Käfer
914b6f01f8
add gl::groups back for easier debugging in Xcode
2015-05-04 17:33:05 +02:00
Konstantin Käfer
f89f7f1bc2
rename prepare => upload and determine passes per layer instead of per bucket
2015-05-04 17:33:05 +02:00