summaryrefslogtreecommitdiff
path: root/src/mbgl/gl
Commit message (Collapse)AuthorAgeFilesLines
* [core] allow context to be abandoned on destructionIvo van Dongen2017-09-222-1/+9
| | | | - This enables the use case where the system already destroyed the underlying GL resources. Otherwise, the cleanup would fail and crash
* Preserve depth buffer between 3D layers + optimize render order (#9931)Lauren Budorick2017-09-212-1/+18
| | | 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.
* [core] Rename for clarity: ActiveTexture → ActiveTextureUnitJohn Firebaugh2017-09-114-9/+9
|
* [core] Dirty the correct state when a texture is deletedJohn Firebaugh2017-09-111-2/+4
| | | | When a texture is deleted, it is as if all texture units to which that texture object is bound are rebound to texture object zero. Therefore it's the *bindings* that need to be dirtied, not the active texture unit.
* [all] Merge View into RendererBackendJohn Firebaugh2017-07-262-4/+0
|
* [core] generate masks for raster tiles to avoid painting over childrenKonstantin Käfer2017-07-242-0/+2
|
* [android] Disable program caching on Adreno 3xx, 4xx, and 5xx GPUs due to ↵John Firebaugh2017-07-211-1/+15
| | | | known bugs
* [core] Work around Adreno 2xx GPU bugs (#9573)John Firebaugh2017-07-211-0/+7
|
* [core] Pass correct sources to programIdentifierJohn Firebaugh2017-07-121-10/+6
|
* [core] Add comments explaining typing of AttributeLocation and UniformLocationJohn Firebaugh2017-07-121-0/+8
|
* [core] Reduce memory requirements of VertexArraysJohn Firebaugh2017-07-124-12/+34
|
* [core] Rework attribute binding (again)John Firebaugh2017-07-1214-245/+226
| | | | | | | | | | These changes are necessary for programs whose set of active attributes is not fixed at compile time by a template parameter pack, but rather varies based on the generated shader text at runtime. In such cases, the attribute location of a given named attribute may vary between instances of the same Program. Previously, attribute bindings were implicitly associated with a location based on template parameter order, and -1 was used to indicate an inactive attribute. This left us unable to disable the appropriate attribute when it went from active to inactive. Now, the state tracker for bindings explicitly associates locations and state, and an empty optional is used to indicate an inactive attribute. In addition, a gl::VertexArray class is now exposed, allowing more flexibility in the relationship between Programs, Segments, and attribute bindings. In this commit, that relationship does not change, but the subsequent commit adjusts it to match gl-js, reduce rebinds, and work around buggy VAO implementations. VertexArray uses a pimpl idiom in order to support implementations that lack the VAO extension. In that case, all VertexArrays share global binding state, reflecting the platform reality in the absence of VAOs, while still providing a uniform API.
* [core] Inline getActiveAttributes detailsJohn Firebaugh2017-07-121-25/+11
|
* [core] Include what you useJohn Firebaugh2017-07-121-1/+1
|
* [core] GCC 4.9 bracket initialization issuesBruno de Oliveira Abinader2017-07-121-1/+3
|
* [core] GCC 4.9 is unable to deduce ctors when using bracket initBruno de Oliveira Abinader2017-07-121-4/+16
|
* [core] Added MBGL_CONSTEXPR to satisfy GCC 4.9Bruno de Oliveira Abinader2017-07-121-1/+2
|
* [core] GCC 4.9 does not fully support custom variable templatesBruno de Oliveira Abinader2017-07-122-13/+12
|
* [core] add static asserts for more gl constantsAnsis Brammanis2017-07-113-4/+51
| | | | and rename BufferUsageType to BufferUsage
* [core] improve legibility of labels that follow linesAnsis Brammanis2017-07-113-5/+23
| | | | | | | | | | 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] Bind only active attributes in order to avoid exceeding attribute ↵Lauren Budorick2017-06-293-6/+64
| | | | | 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.
* [core] add MBGL_CHECK_ERROR to some locations where it was missingKonstantin Käfer2017-06-211-4/+4
|
* [core] Eliminate constant attribute bindingsJohn Firebaugh2017-06-143-208/+63
| | | | Rather than binding constant attributes that will never be used, just disable the attribute.
* [core] Dynamic program compilation for data-driven propertiesJohn Firebaugh2017-06-131-6/+5
|
* [core] cleanup ProgramParametersKonstantin Käfer2017-06-131-2/+2
|
* [core] only bind uniforms that exist in the programKonstantin Käfer2017-06-131-1/+1
|
* [core] verify that the active uniform types match our assumed typesKonstantin Käfer2017-06-133-0/+144
|
* [core] store vertex attribute binding to prevent duplicate bindsKonstantin Käfer2017-06-131-0/+1
| | | | | | | | | 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.
* [core] Per-bucket glyph atlasesJohn Firebaugh2017-06-131-0/+1
|
* [core] glPixelStorei is in OpenGL ES 2John Firebaugh2017-06-135-52/+47
|
* [core] Added Backend::{assume,set}ScissorTestBruno de Oliveira Abinader2017-06-134-2/+22
|
* [core] Reuse RasterBucket for ImageSourceAsheem Mamoowala2017-06-012-0/+2
|
* [tidy] modernize-use-usingBruno de Oliveira Abinader2017-05-121-7/+7
|
* [tidy] modernize-use-autoBruno de Oliveira Abinader2017-05-121-2/+2
|
* [core] Throw exceptions by valueKonstantin Käfer2017-05-051-2/+2
|
* [core] Render fill-extrusion layers (#8431)Lauren Budorick2017-04-273-1/+22
|
* [core] remove unused leftover filesKonstantin Käfer2017-04-203-52/+1
|
* Merge branch 'release-ios-v3.5.0-android-v5.0.0' into ↵Fabian Guerra2017-04-112-0/+51
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * [core] cache binary shaders on AndroidKonstantin Käfer2017-04-039-9/+166
| |
* | [core] Add DDS support for {text,icon}-size (#8593)Anand Thakker2017-04-061-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* | [Qt] Fix typo in gl.hppBruno de Oliveira Abinader2017-04-061-1/+1
| |
* | [core] Value stored to 'format' is never read in Context::drawPixelsBruno de Oliveira Abinader2017-03-311-1/+1
| | | | | | | | Captured via clang-analyzer-deadcode.DeadStores.
* | [core] Privatize gl/gl.hppKonstantin Käfer2017-03-281-0/+50
| |
* | [glfw] Remove GL state restorationKonstantin Käfer2017-03-281-29/+0
| | | | | | | | We're doing all of this in our own context anyway, so no need to restore the state
* | [core] Refactor OpenGL extension loading mechanismKonstantin Käfer2017-03-2318-359/+434
| | | | | | | | 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.
* | [core] Move OpenGL extension initialization to BackendKonstantin Käfer2017-03-232-18/+14
| |
* | [core] cache binary shaders on AndroidKonstantin Käfer2017-03-229-9/+166
| |
* | [core] Remove unnecessary unordered_map includesJohn Firebaugh2017-03-211-1/+0
| |
* | [core] Fix overspecialization of PaintPropertyBinder templateJohn Firebaugh2017-03-171-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-172-81/+1
|/