summaryrefslogtreecommitdiff
path: root/src/mbgl/programs
Commit message (Collapse)AuthorAgeFilesLines
* [core] Add support for data-driven stylingJohn Firebaugh2017-02-0215-160/+338
|
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-1/+1
|
* [core] fix rendering 180° line joinsKonstantin Käfer2017-01-231-1/+1
|
* [core] Update gl-js for shader changeJohn Firebaugh2016-12-231-4/+3
|
* [core] clearer pitched line antialiasingAnsis Brammanis2016-12-212-22/+17
| | | | | | | | | | ported from -js: ef5582dd3bc5c15a3112e875ed66494dab8e9d0b Project the extrusion and compare it's projected pixel length with the actual pixel length and adjust antialiasing accordingly. The previous approach calculated the adjustment much more indirectly and had no intuitive explanation.
* [core, ios] replace `altitude` with `fov`Ansis Brammanis2016-12-212-4/+4
| | | | | | | | | ported from -js: eb6c6596c6a7a61363d30356674e0002153b1d19 `altitude` was a terribly-named variable that was used to indirectly control the fov. This should eliminate some confusion. `altitude` was equivalent to `cameraToCenterDistance / height`
* [core] fix text blurriness at different FOVsAnsis Brammanis2016-12-211-2/+2
| | | | | | | | | | | | | | | | | ported from -js: c52a09639ceeeb809cd837360993df9c45b45420 This replaces a hardcoded shader approximation with a more correct, FOV-dependent one. `gl_Position.w - 0.5` is replaced with `gl_Position.w / tan(fov)` The `/ tan(fov)` is handled by multiplying `1 / tan(fov)` into `u_gamma` outside the shader. I think `- 0.5` was just chosen as something that looked right for the default fov.lease enter the commit message for your changes. Lines starting
* [core] Implement circle-stroke propertiesJohn Firebaugh2016-12-091-0/+6
| | | | Also includes stubs for fill-extrusion layer, because most of the code was auto-generated.
* [core] Move CrossFadedPropertyEvaluator to its own fileJohn Firebaugh2016-12-061-1/+1
|
* Always use a dot as a decimal point in string, independent of localeAki Koskinen2016-11-291-1/+6
| | | | | | | std::to_string() potentially uses a decimal point character different than a dot (.), depending on the environment's locale. But since this generated string will be part of GLSL code, there needs to be a dot and nothing else.
* [core] Convert style properties to a tuple-based approachJohn Firebaugh2016-11-172-27/+28
| | | | | | | | This converts the style property classes (CirclePaintProperties and so on) to the same tuple-based approach as gl::Attribute and gl::Uniform. The approach is outlined in https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md. The main advantage of this approach is it allows writing algorithms that work on sets of style properties, without resorting to code generation or manually repetitive code. This lets us iterate on approaches to data-driven properties more easily. Another advantage is that the cascading, unevaluated, and evaluated states of a set of properties exist as independent structures, instead of individual properties holding their own state. This is a more functional approach that makes data flow clearer and reduces state.
* [core] update native for line property function shaders changes (#6658)Molly Lloyd2016-11-166-55/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [core] update shaders for line property functions update deps, define device pixel ratio for all shaders [core] create ShaderParameter struct to store pixel ratio and overdraw param repair rebase errs update shaders to include pixel ratio make sure collision_box never overdraws update test suite, move shaders to Painter::render so the correct pixel ratio is applied move shader compiling back to the Painter constructor rebase from shader --> program refactor re-factor parameters for collisionBox and debug programs remove unused vars from line-program, move blur math to shader update core files remove unecessary files update shaders PR, remove comments bump test suite sha fix formatting, incorporate feedback refactor program.hpp * [core] remove line transformations that were moved to the shaders, bump shader sha * [core] shorten ProgramParameter instantiation * [core] bump shader+test suite shas
* [core] Introduce SegmentVectorJohn Firebaugh2016-11-154-11/+21
|
* [core] Use gl::Program to resolve some rough edges in the GL binding typesJohn Firebaugh2016-11-089-3/+43
| | | | | | | | | * Extract `ignore` util to separate header. * `Segment` now tracks offset and length of indices, rather than primitives. This is more natural. * Introduce `VertexVector` and `IndexVector` types. These types carry information about the intended draw mode (`Triangles`, `LineStrip`, etc.), and ensure that elements are always appended in a group size appropriate for that draw mode, for both indexed and unindexed rendering. * `Program`, rather than `Drawable`, is now the unifying object for draw calls. `Program` is the best place to type check the draw call, because it is typed to carry information about the intended primitive, vertex type, attributes, and uniforms. * Use the debug shaders for debug tile rendering, like gl-js. * Fix the draw mode for background. It was drawing triangle strips with a triangles array. Surprised this didn’t cause issues. Now it’s type checked.
* [core] Introduce gl::Program templateJohn Firebaugh2016-11-0816-0/+1088