summaryrefslogtreecommitdiff
path: root/src/mbgl/programs/attributes.hpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] Align line vertex to 4-byte boundaryJohn Firebaugh2017-09-081-1/+1
| | | | 10 byte vertices are heavily penalized by common GL implementations.
* [core] Use separate attribute component for line normalsJohn Firebaugh2017-08-081-0/+1
| | | | Broadcom GPUs don't cope well with using the least significant bit for this.
* [core] improve legibility of labels that follow linesAnsis Brammanis2017-07-111-0/+1
| | | | | | | | | | 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.
* [core] Pass pitch-scaling vertex attributes and uniforms to shaders.Chris Loer2017-07-111-0/+2
|
* [core] Enable property functions for line-width (#9250)Lauren Budorick2017-06-191-0/+5
|
* [core] rename a_gap_width => a_gapwidth, u_gap_width => u_gapwidth to ↵Konstantin Käfer2017-06-141-1/+1
| | | | | | reflect naming in the shader not sure how this ever worked
* [core] Render fill-extrusion layers (#8431)Lauren Budorick2017-04-271-0/+2
|
* [core] Add DDS support for {text,icon}-size (#8593)Anand Thakker2017-04-061-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | * Update gl-js and generate style code * Factor out packUint8Pair() helper function * Draft implementation of DDS for {text,icon}-size Ports https://github.com/mapbox/mapbox-gl-js/pull/4455 * Fix text-size/composite-function-line-placement test * Refactor to PaintPropertyBinders-like strategy * Dedupe gl::Program construction * Use exponential function base for interpolation * Dedupe coveringZoomStops method * Fixup tests * Fix CI errors (hidden within #if block)
* [core] Fix overspecialization of PaintPropertyBinder templateJohn Firebaugh2017-03-171-143/+38
| | | | | | | | | | | | | | | | | | PaintPropertyBinder and subclass templates were being instantiated for every unique attribute type (e.g. a_color, a_fill_color, a_halo_color) even though they behave identically for a given property value type (e.g. Color). To fix this, a unique type such as a_color no longer derives from gl::Attribute<...> -- instead it has an inner Type typedef, which should be used wherever neither a unique type nor attribute name is required. This reduces binary size substantially: VM SIZE FILE SIZE ++++++++++++++ GROWING ++++++++++++++ -------------- SHRINKING -------------- -2.0% -49.3Ki __TEXT,__text -49.3Ki -2.0% -3.1% -5.21Ki [None] -2.79Ki -1.6% -2.1% -4.12Ki __TEXT,__const -4.12Ki -2.1% -1.4% -4.04Ki __TEXT,__gcc_except_tab -4.04Ki -1.4% -19.3% -3.62Ki __DATA,__data -3.62Ki -19.3% -2.5% -1.65Ki __TEXT,__unwind_info -1.65Ki -2.5% -4.2% -8 __DATA,__mod_init_func 0 [ = ] -1.9% -68.0Ki TOTAL -65.6Ki -1.9%
* [core] Don't need to use normalized attributes anymoreJohn Firebaugh2017-03-171-5/+4
|
* Pack min + max into one attribute :muscle:Molly Lloyd2017-03-081-46/+50
| | | | | | | | Some devices supported by Mapbox GL provide only 8 vertex attributes; this change packs existing attributes to get us just under that limit. For properties using a composite function, pack the min and max values into a single attribute with two logical components instead of using two separate attributes and buffers. Special logic is included for color attributes, whose integer components must be packed into the available bits of floating-point attributes. (We don't have access to ivec types in GL ES 2.0.) For source functions, continue to bind just a one-component attribute even though the GLSL type is vec2 (or vec4 for colors). The type-checking done by gl::Attribute is relaxed slightly to accommodate this.
* [core] Implement data-driven styling for ↵Anand Thakker2017-02-281-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {text,icon}-{color,opacity,halo-color,halo-blur,halo-width} (#7939) * Add symbol dds attributes and adapt style code generation * Update to mapbox-gl-js/master * Refactor SymbolFeature as a subclass of GeometryTileFeature Prepares for enabling DDS on symbol paint properties by allowing the SymbolFeatures, which we keep around after constructing SymbolLayout, to be used in evaluating data-driven paint properties later in the layout process. * Draft approach for splitting icon/text paint properties The `Program` types are set up to bind GL attributes to each of the data-driven paint properties specified in the `PaintProperties` type provided. Since `SymbolPaintProperties` specifies both `Text*` and `Icon*` properties, the symbolIcon, symbolIconSDF, and symbolGlyph programs each attempt to bind roughly double the number of attributes that they actually need. This change addresses this by: - Adding the more specific `IconPaintProperties` and `TextPaintProperties` types, which are subsets of the full `SymbolPaintProperties`. - The symbol layer continues to use its `SymbolPaintProperties paint` member to track layer property state, but it provides helpers that construct objects of each the specific `{Icon,Text}PaintProperties::Evaluated` type, for use by the painter. - The three symbol programs instantiate `Program<>` using the appropriate `{Icon,Text}PaintProperties` type. * check in generated style code * Populate paint buffers for symbol DDS properties * Address first round of review comments * Refactor VectorTile{Layer,Feature} to explicitly share data * Update submodule
* [core] Add support for data-driven stylingJohn Firebaugh2017-02-021-4/+156
|
* [core] Introduce gl::Program templateJohn Firebaugh2016-11-081-0/+23