Commit Graph

54 Commits

Author SHA1 Message Date
Ivo van Dongen
bda6ed26c6 [core] send signal to RenderCustomLayer when gl context has been lost
- Prevents cleaning up of GL resources that no longer exist, resulting in a crash
2017-09-22 23:33:56 +03:00
Lauren Budorick
a9ddf5b7fd Preserve depth buffer between 3D layers + optimize render order (#9931)
Port of https://github.com/mapbox/mapbox-gl-js/pull/5101: adds a new render pass `Pass3D` before any other rendering wherein we render layers with 3D passes (fill-extrusion layers) to offscreen framebuffers, sharing a depth renderbuffer between those layers in order to render 3D space correctly. Those framebuffers are saved on the RenderLayers and copied back to the map during the translucent pass. Rendering to offscreen framebuffers before we do any clear + draw means we can avoid expensive framebuffer restores.
2017-09-21 14:26:48 -07:00
John Firebaugh
d4cb498d7a [all] Merge View into RendererBackend 2017-07-26 09:50:38 -07:00
Ivo van Dongen
27343c6a75 [core] fix backend scope handling on render, cleanup and lowmemory
- Make renderer frontend responsible for creating a BackendScope on render
- encapsulate backend scope handling on cleanup and low memory in renderer impl
2017-07-25 17:44:28 +03:00
John Firebaugh
2cdbb49a0c [core] Fix build; struct ⇢ class 2017-07-19 13:31:59 -07:00
Bruno de Oliveira Abinader
4954da23e7 [core] No need for default ctor in {Update,Tile}Parameters 2017-07-19 19:24:30 +03:00
Bruno de Oliveira Abinader
5d4ed27068 [core] Bracket init works for optional<T> in GCC 4.9 2017-07-19 19:24:30 +03:00
Ivo van Dongen
9ebf727f56 [core] BackendScope prevent double (de-)activation
- Guards against duplicate activations by checking wether the backend of the prior scope is the same as the current ones
- Makes sure that only the most outer backend scope deactivates by tracking activation state
2017-07-18 10:45:12 +02:00
Ivo van Dongen
46c43510d7 [core] rename backend to renderer backend 2017-07-18 10:45:12 +02:00
Ivo van Dongen
3832f8d0d8 [core] renderer interface 2017-07-18 10:45:12 +02:00
Konstantin Käfer
abafb52f37 make most headers private 2014-12-04 20:02:50 +01:00
John Firebaugh
a6522d4a5a Texturepool ⇢ TexturePool (fixes #655) 2014-12-02 12:24:25 -08:00
John Firebaugh
576533b18c Eliminate Map::getTexturepool() 2014-11-26 15:13:13 -08:00
John Firebaugh
7caac537b8 Fix variable shadowing 2014-10-29 10:12:41 -04:00
John Firebaugh
da8aa391d0 Render map with a copy of TransformState 2014-10-29 09:58:56 -04:00
artemp
9364fd7322 make addGlyphsToAtlas static method of SymbolBucket + add addGlyphs method to minimise number of mutex locking 2014-10-27 14:18:11 -04:00
Konstantin Käfer
214f99673f fix variable shadowing 2014-10-22 18:19:01 +02:00
Mike Morris
2d1219fa51 Merge branch 'master' into libuv-0.10-headless-display
Conflicts:
	common/curl_request.cpp
	common/glfw_view.cpp
	common/glfw_view.hpp
	include/mbgl/platform/request.hpp
	ios/mapbox-gl-cocoa
	setup-libraries.sh
	src/map/map.cpp
	src/platform/request.cpp
	test/fixtures/fixture_request.cpp
2014-10-10 12:24:45 -04:00
Konstantin Käfer
f26bb724dc use util::ptr as a wrapper around std::shared_ptr that asserts nonemptiness 2014-09-24 16:14:09 +02:00
Leith Bade
71549e7b93 Adds the function Map::terminate() to allow all GL resources held
by the map to be released immediately.

Map::terminate() will call any GL functions on the current thread
without blocking or defering to the rendering thread.

This function allows a GL context to be destroyed and recreated
safely without having to delete the Map object.

Fixes mapbox/mapbox-gl-native#341

Conflicts:
	include/llmr/renderer/painter.hpp
	test/headless.cpp
2014-09-10 18:31:20 -04:00
John Firebaugh
eb4f53cbed SDF icon support (fixes #404) 2014-09-08 15:12:32 -07:00
John Firebaugh
de720f3515 FrameHistory::getFadeProperties 2014-09-05 14:03:33 -07:00
John Firebaugh
f2391e25ea TextShader ⇢ SDFShader 2014-09-04 17:59:22 -07:00
John Firebaugh
1fedf0918a Less shader boilerplate 2014-09-04 16:22:25 -07:00
John Firebaugh
c14ae3c477 Fix text/icon-translate-anchor
These are style properties, not render properties.
2014-09-04 15:38:14 -07:00
Lauren Budorick
71c31cee24 linepattern in progress 2014-09-03 18:12:40 -07:00
John Firebaugh
e71a1a9077 Simplify 2014-08-28 17:16:37 -07:00
John Firebaugh
bfa0b7f009 Remove vtxMatrix state 2014-08-28 17:13:55 -07:00
John Firebaugh
c13cc4aa38 Record frame history in the correct place
Fixes numerous issues with rendering tests.
2014-08-28 16:43:03 -07:00
John Firebaugh
e2c2ab843e Render background with plain shader 2014-08-27 18:22:20 -07:00
Konstantin Käfer
312cae1a05 Merge pull request #451 from mapbox/noncopyable-vao
VertexArrayObject and ElementGroup should be noncopyable
2014-08-27 12:36:48 +02:00
Konstantin Käfer
c3cb458225 make ElementGroup and VertexArrayObject movable to avoid using unique_ptrs 2014-08-27 12:08:21 +02:00
John Firebaugh
489b664232 Remove unused 2014-08-26 15:15:33 -07:00
John Firebaugh
42d0740ef0 VertexArrayObject and ElementGroup should be noncopyable 2014-08-26 14:43:56 -07:00
Ansis Brammanis
32a1711d8c remove support for composite layers 2014-08-15 15:52:53 +02:00
Konstantin Käfer
8c3675755e base static vertexbuffer on buffer object 2014-08-15 13:39:49 +02:00
Konstantin Käfer
d6bfb4be65 fix binding to vaos 2014-08-14 18:30:45 +02:00
Konstantin Käfer
bfd1281285 only set changed glDepthRange values 2014-08-14 12:58:41 +02:00
Lauren Budorick
0d2724dec4 Raster styling all functional except brightness -- need to rework parsing 2014-08-12 18:27:35 -07:00
Konstantin Käfer
22e179aa37 remove trailing whitespace
[skip ci]
2014-08-12 16:30:27 +02:00
Konstantin Käfer
18b1469e9e use unified RenderPass type 2014-08-12 15:24:02 +02:00
Lauren Budorick
0263a9ffb7 minor access changes etc 2014-08-11 15:42:09 -07:00
Lauren Budorick
41165452bc some cleaning up, raster spin->hue-rotate rename 2014-08-11 12:13:24 -07:00
Lauren Budorick
1ad2f26b9d VICTORY 2014-08-11 12:13:23 -07:00
Lauren Budorick
ec7f7de5c4 still not working 2014-08-11 12:13:22 -07:00
Lauren Budorick
560cc112e1 rm rasterize_properties, should be close to working...doesn't work 2014-08-11 12:13:22 -07:00
Lauren Budorick
9e1156d660 take 2, still not working 2014-08-11 12:13:22 -07:00
Lauren Budorick
df925fe0e5 nonworking prerendering attempts 2014-08-11 12:12:43 -07:00
Konstantin Käfer
36181b0922 update symbol placement to be more like js 2014-08-04 18:24:22 +02:00
Konstantin Käfer
9dd50a29e1 update shaders and backport some collision changes 2014-08-04 12:59:22 +02:00