summaryrefslogtreecommitdiff
path: root/src/mbgl/programs/program.hpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] move ProgramMap to within the gl::Program objectKonstantin Käfer2019-03-201-30/+0
|
* Merge pull request #14126 from mapbox/gfx-refactor-4Konstantin Käfer2019-03-151-52/+52
| | | Graphics refactor #4
* [core] add texture bindings to draw call instead of Context member fnKonstantin Käfer2019-03-121-1/+1
|
* [core] add texture bindings to draw call invocationsKonstantin Käfer2019-03-121-1/+5
|
* [core] add place for specifying textures/samplers separately from uniformsKonstantin Käfer2019-03-121-0/+1
|
* [core] move VertexBuffer<> to gfx namespaceKonstantin Käfer2019-03-061-1/+1
|
* [core] move IndexBuffer to gfx namespaceKonstantin Käfer2019-03-061-1/+1
|
* [core] remove unused template parameter from gl::IndexBufferKonstantin Käfer2019-03-061-1/+1
|
* [core] move CullFaceMode to gfx namespaceKonstantin Käfer2019-03-011-1/+1
|
* [core] move StencilMode to gfx namespaceKonstantin Käfer2019-03-011-1/+1
|
* [core] move DepthMode to gfx namespaceKonstantin Käfer2019-03-011-1/+1
|
* [core] move ColorMode to gfx namespaceKonstantin Käfer2019-03-011-1/+1
|
* [core] extract attribute structs and gl::Vertex to separate namespaceKonstantin Käfer2019-03-011-16/+17
|
* [core] extract uniform type lists from gl namespaceKonstantin Käfer2019-03-011-4/+4
|
* [core] Split layer type specific code in mbgl::ProgramsMikhail Pozdnyakov2019-01-111-0/+5
| | | | | | | | | | | Progams code for a certain layer type is encapsulted within a dedicated `<layer type>Programs` class, inherited from the generic base `LayerTypePrograms` class. `mbgl::Programs::get<layer type>Programs()` lazily initializes the layer type-specific programs code using pointer to the base class, which allows LTO to remove this code from binaries (if the corresponding `get<layer type>Programs()` method can never be invoked).
* [core] Add face culling mode parameter to Program::drawBruno de Oliveira Abinader2018-09-131-0/+2
| | | | | | Add a parameter to Program::draw to control whether face culling should be enabled. This will be used in a follow up commit to enable face culling for fill extrusion layers.
* [core] Don't crash when attribute count is exceededKonstantin Käfer2018-05-031-11/+23
|
* [core] No need for optional in map of VertexArraysJohn Firebaugh2017-07-121-4/+4
|
* [core] Per-segment-per-layer vertex arraysJohn Firebaugh2017-07-121-4/+7
| | | | Reduces rebinding, matches gl-js, and works around the buggy VAO implementation on PowerVR SGX544 GPUs.
* [core] Rework attribute binding (again)John Firebaugh2017-07-121-15/+27
| | | | | | | | | | 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] Eliminate constant attribute bindingsJohn Firebaugh2017-06-141-1/+1
| | | | 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-1/+34
|
* [core] add constant DDS values as uniformsKonstantin Käfer2017-06-131-1/+1
|
* [core] Unify {Paint,Layout,Light}PropertiesJohn Firebaugh2017-05-151-1/+1
|
* [core] Add DDS support for {text,icon}-size (#8593)Anand Thakker2017-04-061-49/+6
| | | | | | | | | | | | | | | | | | | | | | | | * 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] cache binary shaders on AndroidKonstantin Käfer2017-03-221-4/+54
|
* [core] Extract and de-templatize several Program static methodsJohn Firebaugh2017-03-091-27/+4
|
* [core] De-duplicate shader prelude sourceJohn Firebaugh2017-03-081-2/+3
|
* [core] Add support for data-driven stylingJohn Firebaugh2017-02-021-4/+50
|
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-1/+1
|
* Always use a dot as a decimal point in string, independent of localeAki Koskinen2016-11-291-1/+6
| | | | | | | std::to_string() potentially uses a decimal point character different than a dot (.), depending on the environment's locale. But since this generated string will be part of GLSL code, there needs to be a dot and nothing else.
* [core] update native for line property function shaders changes (#6658)Molly Lloyd2016-11-161-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [core] update shaders for line property functions update deps, define device pixel ratio for all shaders [core] create ShaderParameter struct to store pixel ratio and overdraw param repair rebase errs update shaders to include pixel ratio make sure collision_box never overdraws update test suite, move shaders to Painter::render so the correct pixel ratio is applied move shader compiling back to the Painter constructor rebase from shader --> program refactor re-factor parameters for collisionBox and debug programs remove unused vars from line-program, move blur math to shader update core files remove unecessary files update shaders PR, remove comments bump test suite sha fix formatting, incorporate feedback refactor program.hpp * [core] remove line transformations that were moved to the shaders, bump shader sha * [core] shorten ProgramParameter instantiation * [core] bump shader+test suite shas
* [core] Use gl::Program to resolve some rough edges in the GL binding typesJohn Firebaugh2016-11-081-3/+5
| | | | | | | | | * 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-0/+31