summaryrefslogtreecommitdiff
path: root/test/programs
Commit message (Collapse)AuthorAgeFilesLines
* [core] Rework attribute binding (again)John Firebaugh2017-07-121-8/+8
| | | | | | | | | | 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] improve legibility of labels that follow linesAnsis Brammanis2017-07-111-4/+0
| | | | | | | | | | 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.
* Fix undefined memory access in getCoveringRanges() (#9227)Anand Thakker2017-06-091-0/+61
| | | | | | | | | | | | * Add simple unit tests for SymbolSizeBinder * Fix bug in symbol size uniform value calculation For camera functions we were setting the zoom levels in "covering ranges" to `[(zoom stop <= tile zoom), (zoom stop >= 1 + tile zoom)]`, but then evaluating the function at `[tile_zoom, tile_zoom + 1]`. * Check for it != end() before accessing it->first
* [core] cache binary shaders on AndroidKonstantin Käfer2017-03-221-0/+39