Commit Graph

41 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
c7bbd5bbef [core] Fix performance-move-const-arg 2019-09-25 18:59:07 +03:00
Juha Alanen
1ac8e3c161 [core] Add setFeatureState API to Tile classes 2019-09-18 14:29:15 +03:00
Aleksandar Stojiljkovic
2c5528e691 Fix layers rendering after fill-extrusion
This fixes following issues:
* Fix some false passing combinations/fill-extrusion-translucent--XXXX tests
* Fix and enable other, failing but ignored, combinations/fill-extrusion-translucent--XXXX tests
* Fix rendering of layers that are on top of fill-extrusion layers

state.getProjMatrix(nearClippedProjMatrix, 100) caused that tests with size 64x64 were not
rendering fill extrusions: far plane calculated as 96.9 and near plane set to 100 was the cause.
near plane is changed from hardcoded 100 to depend on state.getCameraToCenterDistance() - producing
similar value but one that follows max zoom.

This caused that e.g. combinations/fill-extrusion-translucent--fill-opaque was falsely passing as
only fill-opaque layer got rendered.

combinations/fill-extrusion-translucent--XXXX tests expose regression https://github.com/mapbox/mapbox-gl-native/issues/14844#issuecomment-503600034 in #14844, #14779.

Fix (opaquePassCutoff, is3D) is ported from https://github.com/mapbox/mapbox-gl-js/pull/7821

Fixes: #14844, #14779, #15039
2019-07-09 15:13:38 +02:00
Mikhail Pozdnyakov
da3b7749b0 [core] RenderSource creates render items 2019-07-04 16:56:43 +03:00
Mikhail Pozdnyakov
e797e31831 [core] ImageManager is not used at tile upload stage 2019-07-04 16:56:43 +03:00
Mikhail Pozdnyakov
63dd17e2bb [core] Introduce TileRenderData
Remove rendering functionality from Tile implementations.
2019-07-04 16:56:43 +03:00
Mikhail Pozdnyakov
d570834975 [core] Remove orchestration methods from RenderTile 2019-07-04 16:56:43 +03:00
Mikhail Pozdnyakov
737665bc07 [core] Refactor tile pyramid
Tile pyramid is no longer operating with `RenderTiles` and does not perform
rendering operations (upload, finish render).

Render tiles belong to rendering, and tile pyramid belongs to orchestration.
2019-06-10 19:36:47 +03:00
Mikhail Pozdnyakov
2f97a2660a [core] RenderTile returns textures by const reference 2019-05-28 16:16:42 +03:00
Mikhail Pozdnyakov
a03f7b166b [core] RenderTile does not expose Tile
RenderTile and Tile will be split when ochestration movces to a separate thread.

This PR improves encapsulation of Tiles management: now performed within TilePyramid.
2019-05-28 16:16:42 +03:00
Mikhail Pozdnyakov
84d3b5f899 [core] Prepare render sources before render layers are initialized 2019-05-22 16:41:10 +03:00
Konstantin Käfer
3a6ff7710f [core] add gfx::UploadPass, split startRender into prepare and upload 2019-05-15 11:57:43 -07:00
Konstantin Käfer
da5bd4d6e3 [core] use unique IDs for DrawScopes 2019-05-15 11:57:43 -07:00
Konstantin Käfer
08163713e2 [core] change approach to stencil clipping to (almost) match JS 2019-04-29 11:37:39 +02:00
Konstantin Käfer
d7aaf83421 [core] introduce gfx::RenderPass 2019-04-05 11:49:17 +02:00
Konstantin Käfer
4053776c27 [core] use unique names for debug segments 2019-04-05 11:49:17 +02:00
Konstantin Käfer
0ad2375e10 [core] remove a_/u_ prefix from attribute/uniform types 2019-03-20 15:40:47 +01:00
Konstantin Käfer
52cf9a1af3 [core] remove gl/context.hpp from more files, cast where necessary 2019-03-20 15:40:47 +01:00
Konstantin Käfer
c8cfdb1ced Merge pull request #14126 from mapbox/gfx-refactor-4
Graphics refactor #4
2019-03-15 20:31:12 +01:00
Konstantin Käfer
cb64c380fb [core] add texture bindings to draw call invocations 2019-03-12 11:03:54 +01:00
Bruno de Oliveira Abinader
ba7427b4ac [core] Transform{State}: s/angle/bearing/ 2019-03-04 14:45:32 +02:00
Konstantin Käfer
67a9dc35bf [core] move CullFaceMode to gfx namespace 2019-03-01 09:33:37 +01:00
Konstantin Käfer
4982933a78 [core] move DepthMode to gfx namespace 2019-03-01 09:33:37 +01:00
Konstantin Käfer
da6e1390c6 [core] move ColorMode to gfx namespace 2019-03-01 09:33:37 +01:00
Konstantin Käfer
fd37d90650 [core] move draw mode and primitives to gfx namespace 2019-03-01 09:33:37 +01:00
Konstantin Käfer
95deab32ce [core] extract attribute structs and gl::Vertex to separate namespace 2019-03-01 09:33:37 +01:00
Bruno de Oliveira Abinader
05a7b78aa8 [core] Add face culling mode parameter to Program::draw
Add a parameter to Program::draw to control whether face culling should
be enabled. This will be used in a follow up commit to enable face
culling for fill extrusion layers.
2018-09-13 08:42:36 +03:00
Molly Lloyd
4a5dc37245 [core] Implement CrossFadedDataDrivenProperty to add support for feature expressions in *-pattern properties 2018-08-31 13:08:47 -07:00
Konstantin Käfer
c3346f473a [core] Don't crash when attribute count is exceeded 2018-05-03 16:31:43 -07:00
Lauren Budorick
43a9bd3fba [core] Use separate shaders for background and clipping 2018-01-09 15:02:49 -08:00
Thiago Marcos P. Santos
761f506578 [core] Do not use polymorphic lambda
Crashes with GCC 5.2.0 needed by Qt Automotive.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68278
2017-08-07 17:20:33 +03:00
Konstantin Käfer
c0efad5de2 [core] generate masks for raster tiles to avoid painting over children 2017-07-24 12:10:45 +02:00
John Firebaugh
64203ba53f [core] Refactor Painter away 2017-07-19 09:31:07 -07:00
John Firebaugh
ac58130d36 [core] Extract renderTileDebug; inline renderClippingMask 2017-07-19 09:31:07 -07:00
Ansis Brammanis
e514138b69 [core] improve legibility of labels that follow lines
port https://github.com/mapbox/mapbox-gl-js/pull/4781

This improves legibility of labels that follow lines in pitched views.
The previous approach used the limited information in the shader to
calculate put the glyph in approximatelyright place. The new approach
does this more accurately by doing it on the cpu where we have access to
the entire line geometry.
2017-07-11 09:10:24 -07:00
John Firebaugh
f5d3b850bf [core] Merge RenderLayer::uploadBuckets into RenderSource::startRender 2017-06-13 10:18:43 -07:00
John Firebaugh
17db460345 [core] Parallelism in {start,finish}Render parameters 2017-06-13 10:18:43 -07:00
Lauren Budorick
f6e79d7073 [core] Render fill-extrusion layers (#8431) 2017-04-27 15:56:55 -07:00
John Firebaugh
ae838b397b [core] Move translatedMatrix to RenderTile 2016-07-11 18:39:50 -07:00
Konstantin Käfer
77e7846756 [core] code style cleanups
- puts function definitions in a namespace ... {} rather than using namespace ...;
- remove trailing whitespace
- add trailing newline
- protect SQL statements from being formatted by clang-format
2016-07-01 12:38:33 +02:00
John Firebaugh
3ab7c1cca3 [core] Tile ⇢ RenderTile 2016-06-13 10:57:46 -07:00