Commit Graph

192 Commits

Author SHA1 Message Date
John Firebaugh
21d7ee11e1 [core] Rationalize shader names
{layer type}{subtype}Shader
2016-10-06 14:47:58 -07:00
John Firebaugh
f438bb68b0 [core] Adhere to vertices/vertexBuffer naming convention 2016-10-05 10:52:19 -07:00
John Firebaugh
73334ac8fa [core] Move shader and uniform to gl directory 2016-10-05 10:52:19 -07:00
John Firebaugh
7a3bef091e [core] Refactor Buffer 2016-10-05 10:52:19 -07:00
Konstantin Käfer
8c4da72d09 [core] only load debug extensions in debug mode 2016-09-29 13:19:27 -07:00
Konstantin Käfer
cc78b74098 [core] remove dependence on gl.h types 2016-09-29 10:17:47 -07:00
Konstantin Käfer
44c7e9d05e [core] merge gl::ObjectStore into gl::Context 2016-09-27 11:03:29 -07:00
Konstantin Käfer
ce42d22984 [core] rename gl::Config to gl::Context 2016-09-27 11:03:29 -07:00
Konstantin Käfer
21386b3146 [core] move GL value accessors to gl::value namespace 2016-09-27 11:03:29 -07:00
Konstantin Käfer
ffa8a7668b [core] store viewport and FBO binding 2016-09-27 10:42:10 +02:00
Konstantin Käfer
afb93d4d3a [core] track VAOs and Buffers 2016-09-26 11:14:40 +02:00
Lucas Wojciechowski
37cb2bd756 [core] Convert uses of std::set to std::unordered_set (#6325)
* src/mbgl/annotation/annotation_manager.hpp

* src/mbgl/algorithm/update_renderables.hpp

* src/mbgl/geometry/glyph_atlas.hpp

* src/mbgl/renderer/painter.cpp and src/mbgl/renderer/render_item.hpp

* src/mbgl/renderer/symbol_bucket.hpp and src/mbgl/text/glyph_store.hpp

* src/mbgl/sprite/sprite_atlas.hpp

* include/mbgl/storage/network_status.hpp

* src/mbgl/text/collision_tile.cpp

* src/mbgl/style/update_batch.hpp

* platform/default/mbgl/storage/offline_download.hpp

* Add GlyphRangeSet typedef

* Fix whitespace & unused imports
2016-09-19 17:26:25 -07:00
John Firebaugh
dc1861f6d5 [core] Merge GlyphStore and GlyphAtlas 2016-09-19 09:40:43 -07:00
Konstantin Käfer
85e222c825 [core] change bool overdraw to PaintMode::Overdraw 2016-09-07 17:56:38 +02:00
Konstantin Käfer
e6bcbdd5d3 [core] set correct depth values for CustomLayer so compositing works 2016-08-22 18:32:12 +02:00
Konstantin Käfer
0df60c4651 [core] add ability show visualize the depth buffer to the GLFW and macOS app 2016-08-19 17:41:55 +02:00
Bruno de Oliveira Abinader
3ae506ee13 [core] Use NDEBUG instead of DEBUG
CMake defines 'NDEBUG' by default for release build, so we can check if
that's not defined instead of using 'DEBUG' for debug build.
2016-08-05 11:42:22 +02:00
Bruno de Oliveira Abinader
30f5aa72de [core] Make MapDebugOptions::StencilClip a no-op in Release mode 2016-07-20 12:48:52 +03:00
Bruno de Oliveira Abinader
a709ea2656 [core] Make MapDebugOptions::Overdraw a no-op in Release mode 2016-07-20 12:48:52 +03:00
John Firebaugh
fe99295970 [core] Remove unused 2016-07-11 18:39:50 -07:00
John Firebaugh
ae838b397b [core] Move translatedMatrix to RenderTile 2016-07-11 18:39:50 -07:00
John Firebaugh
a27b5586e5 [core] Pass RenderTile rather than individual parameters 2016-07-11 18:39:50 -07:00
John Firebaugh
6e77149c13 [core] Introduce PaintParameters
Use it to DRY selection of regular vs. overdraw shaders and VAOs.
2016-07-11 18:39:50 -07:00
John Firebaugh
822ec091da [core] Introduce non-anonymous Shaders class 2016-07-11 18:39:50 -07:00
Konstantin Käfer
4f26c8122a [core] track texture state to avoid redundand binds 2016-07-08 13:11:25 +02:00
John Firebaugh
c8e87128b1 [core] Make extrudeScale calculations more similar to JS 2016-07-07 14:18:00 -07:00
Konstantin Käfer
2e10c0a866 [core] don't force GL state to be set when calling .reset()
We are using Value::reset() to change a piece of GL state to its default value. However, the current implementation always executes the GL call, even if our state tracking system knows that it's already at that value. The new implementation of Value::reset() now respects that, resulting in a lot fewer GL calls.
2016-07-07 16:29:34 +02:00
Konstantin Käfer
69c529e264 [core] move shaders to anon struct and alias them 2016-07-07 15:06:59 +02:00
Bruno de Oliveira Abinader
3bf85cc55d [core] Added StaticRasterVertexBuffer 2016-07-02 17:21:59 +03:00
Bruno de Oliveira Abinader
a17b0bcd82 [core] Fix overdraw mode on Linux
- Use glBindAttribLocation for GLSL attributes.
- Create a separate shader for each shader that supports overdraw.
  Needed because each uniform location must be known for every program.
- Create a separate VAO for each shader inside buckets.
  Needed because we can only bind a VAO to a specific shader.

Fixes #5435.
2016-07-01 19:47:35 +03:00
John Firebaugh
8956179ce0 [core] Merge TexturePool into ObjectStore; pool all textures (#5477) 2016-06-27 13:44:46 -07:00
Konstantin Käfer
d58ed6f9f3 [core] remove TexturePool dependency from Raster constructor 2016-06-22 16:28:32 +02:00
Bruno de Oliveira Abinader
97dffeb03d [core] s/Wireframe/Overdraw/g 2016-06-20 13:24:20 +03:00
Bruno de Oliveira Abinader
df5a395708 [core] Refactor wireframe to match JS overdraw mode 2016-06-20 13:24:20 +03:00
John Firebaugh
900568cfb0 [core] Runtime source API: private impls 2016-06-16 13:27:15 -07:00
John Firebaugh
a020e535ca [core] Add a few conveniences to Color 2016-06-15 13:22:00 -07:00
Young Hahn
24b66bc8cd Color class (#5361)
* Color class

* Switch to list initialization
2016-06-15 11:38:22 -04:00
John Firebaugh
98357ab68e [core] Add Source::startRender for parallelism with finishRender 2016-06-14 11:25:45 -07:00
Bruno de Oliveira Abinader
9142c447e8 [tidy] Check llvm-namespace-comment
Ref: http://clang.llvm.org/extra/clang-tidy/checks/llvm-namespace-comment.html
2016-06-13 23:32:05 +03:00
John Firebaugh
3ab7c1cca3 [core] Tile ⇢ RenderTile 2016-06-13 10:57:46 -07:00
John Firebaugh
c902f9098b [core] Rationalize naming for style-related code 2016-06-02 14:51:39 -07:00
John Firebaugh
a43940afb2 [core] Runtime style layer API 2016-06-02 14:51:39 -07:00
Bruno de Oliveira Abinader
2038a21cb5 [core] s/GLObjectStore/ObjectStore/ 2016-06-01 13:53:39 +03:00
Bruno de Oliveira Abinader
59f9a9f93c [core] Update sdf shader code
Ported the following patch:
- [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
2016-06-01 11:18:43 +03:00
Bruno de Oliveira Abinader
5e7736ce87 [core] Update icon shader code
Ported the following patch:
- [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
2016-06-01 11:18:18 +03:00
Bruno de Oliveira Abinader
62b4dd554a [core] Update circle shader code
Ported the following patches:
 - [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
 - [Enabled data-driven styling for circle-radius](4356e41fa6)
 - [Reduce shader boilerplate, refactor "Bucket"](7d3da8f191)
2016-05-31 18:02:40 +03:00
John Firebaugh
672eb61079 [core] box_shader ⇢ collision_box_shader 2016-05-25 21:37:22 -07:00
John Firebaugh
30ec1c1fed [core] Remove unused dot shader 2016-05-25 21:37:22 -07:00
Bruno de Oliveira Abinader
1769e6fcb4 [core] Move GLFW stencil clip debug to core
This makes the stencil clip debug available to all platforms.

Fixes #4669.
2016-05-24 19:58:24 +03:00
Bruno de Oliveira Abinader
7143408f69 [core] Implement MapDebugOptions::Wireframe
Together with MapDebugOptions::Collision, provides "wireframe" rendering
output so all drawn objects are visible. This mode ignores the line
width, background and fill colors for better visualization.

Fixes #4359.
2016-05-23 11:50:05 +03:00