summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/context.hpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] allow context to be abandoned on destructionIvo van Dongen2017-09-221-0/+6
| | | | - This enables the use case where the system already destroyed the underlying GL resources. Otherwise, the cleanup would fail and crash
* [core] Rename for clarity: ActiveTexture → ActiveTextureUnitJohn Firebaugh2017-09-111-1/+1
|
* [all] Merge View into RendererBackendJohn Firebaugh2017-07-261-3/+0
|
* [core] Rework attribute binding (again)John Firebaugh2017-07-121-5/+7
| | | | | | | | | | 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] add static asserts for more gl constantsAnsis Brammanis2017-07-111-2/+2
| | | | and rename BufferUsageType to BufferUsage
* [core] improve legibility of labels that follow linesAnsis Brammanis2017-07-111-3/+10
| | | | | | | | | | 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] glPixelStorei is in OpenGL ES 2John Firebaugh2017-06-131-2/+3
|
* [core] Added Backend::{assume,set}ScissorTestBruno de Oliveira Abinader2017-06-131-0/+1
|
* [core] Render fill-extrusion layers (#8431)Lauren Budorick2017-04-271-1/+5
|
* [core] Refactor OpenGL extension loading mechanismKonstantin Käfer2017-03-231-1/+29
| | | | 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] cache binary shaders on AndroidKonstantin Käfer2017-03-221-0/+10
|
* [core] Remove unnecessary unordered_map includesJohn Firebaugh2017-03-211-1/+0
|
* [core] Redo approach to unsupported VAO extensionJohn Firebaugh2017-02-201-0/+2
|
* [core] Restore support for GL implementations without VAO extensionJohn Firebaugh2017-02-101-0/+4
|
* [core] Add support for data-driven stylingJohn Firebaugh2017-02-021-23/+12
|
* [core] Return to static, per-segment approach to VAOsJohn Firebaugh2016-11-151-14/+0
| | | | 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.
* [core] Assign attribute locations sequentiallyJohn Firebaugh2016-11-151-0/+1
| | | | | | | 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.
* [core] Use gl::Program to resolve some rough edges in the GL binding typesJohn Firebaugh2016-11-081-10/+30
| | | | | | | | | * 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-081-3/+3
|
* [core] move pixel blitting to gl::ContextKonstantin Käfer2016-11-041-0/+11
|
* [core] move framebuffer reading to gl::ContextKonstantin Käfer2016-11-041-0/+10
|
* [core] add state tracking to pixel transferKonstantin Käfer2016-11-041-0/+2
|
* [core] add state tracking to pixel store packing alignmentKonstantin Käfer2016-11-041-0/+2
|
* [core] convert LineAtlas to use managed texture handlingKonstantin Käfer2016-11-011-1/+3
|
* [core] add ability to upload alpha-only textures + imagesKonstantin Käfer2016-11-011-6/+10
|
* [core] convert SpriteAtlas to use managed texture handlingKonstantin Käfer2016-11-011-0/+7
|
* [core] Use VAOs internallyJohn Firebaugh2016-10-281-1/+15
|
* [core] Modern C++ bindings for OpenGLJohn Firebaugh2016-10-281-18/+31
|
* [core] change std::array<uint16_t, 2> to mbgl::SizeKonstantin Käfer2016-10-271-8/+7
|
* [core] move gl::Context to Backend and refactor ViewKonstantin Käfer2016-10-251-3/+24
|
* [core] Improve attribute binding APIJohn Firebaugh2016-10-051-0/+10
|
* [core] Refactor BufferJohn Firebaugh2016-10-051-3/+18
|
* [core] remove Raster object in favor of a more low-level Texture objectKonstantin Käfer2016-10-041-0/+21
|
* [core] remove dependence on gl.h typesKonstantin Käfer2016-09-291-44/+14
|
* [core] introduces types for GL objectsKonstantin Käfer2016-09-291-13/+17
|
* [core] rename VAO => VertexArray, FBO => FramebufferKonstantin Käfer2016-09-291-11/+11
|
* [core] merge gl::ObjectStore into gl::ContextKonstantin Käfer2016-09-271-62/+81
|
* [core] rename gl::Config to gl::ContextKonstantin Käfer2016-09-271-0/+108