| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
and rename BufferUsageType to BufferUsage
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
limits (#9373)
Introducing two new attributes to enable property functions for line-width (#9250) pushed the attribute count over GL_MAX_VERTEX_ATTRIBS on some devices. Now we selectively bind only attributes that are used, making it unlikely to surpass GL_MAX_VERTEX_ATTRIBS.
|
| |
|
|
|
|
| |
Rather than binding constant attributes that will never be used, just disable the attribute.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
We have an "oldBinding" value that we use for checking whether the vertex attribute was already
bound to the current VAO, but we never set the state. Additionally, we're also checking whether
the previous state was already any binding (optional is set), and don't re-enable the vertex
attribute array. Additionally, we now only disable the vertex attribute array when the previous
state was in fact an array attribute. We still don't deduplicate constant glVertexAttrib* calls,
but that's a little trickier.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
boundsj-merge-release-branch
# Conflicts:
# cmake/core-files.cmake
# mapbox-gl-js
# platform/android/CHANGELOG.md
# platform/ios/CHANGELOG.md
# platform/macos/CHANGELOG.md
# platform/qt/bitrise-qt5.yml
# src/mbgl/gl/attribute.hpp
# src/mbgl/gl/context.cpp
# src/mbgl/gl/program.hpp
# src/mbgl/map/map.cpp
# src/mbgl/programs/program.hpp
# src/mbgl/renderer/painter.cpp
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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)
|
| | |
|
| |
| |
| |
| | |
Captured via clang-analyzer-deadcode.DeadStores.
|
| | |
|
| |
| |
| |
| | |
We're doing all of this in our own context anyway, so no need to restore the state
|
| |
| |
| |
| | |
Previously, we initialized global variables that held pointers to the extension functions. While this seemed to work, the spec doesn't guarantee that the function pointers are identical for different OpenGL contexts. Therefore, we are now making them a member variable of the Context object.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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%
|
|/ |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit 8c4da72d09e585bd10d030129c99e1e609a2d2f9.
|
|
|
|
| |
GCC can't cope with it.
|
|
|
|
|
| |
* Off-by-one in DebugBucket indexing
* Must unbind VAO before binding index buffer in Context::createIndexBuffer
|
| |
|
| |
|
|
|
|
| |
This is safer now -- it can be an implementation detail of Segment/Context. And the typing of SegmentVector now ensures that the attributes and program match.
|
| |
|
|
|
|
|
|
|
| |
Two reasons to prefer explicit sequential location assignment, rather than relying on the GLSL linker to assign locations:
* For data-driven properties, we want to have the option to use glDisableVertexAttribArray plus glVertexAttrib*. In order to use glDisableVertexAttribArray, we must avoid using attribute location 0, which cannot be disabled.
* We want to use the same VAO in cases where, say, a fill layer might be rendered with FillProgram at first, and then FillPatternProgram later. VAOs do not store the program binding, only the attribute bindings, so as long as the two programs have the same attributes and attribute locations, only a single VAO (per segment) is needed.
|
| |
|
| |
|
| |
|