| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This patch will make Mapbox GL Core never use OpenGL
directly. We should consider locking into OpenGL ES 2.0
to simplify the code path and remove #ifdefs.
|
|
|
|
|
|
|
| |
Currently the vertex object extension is disabled through an ifdef for
the Windows platform due to an issue with ANGLE, while there is a
blacklist for other platforms. Unify those by adding ANGLE to that
blacklist and some small refactoring.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
Co-Authored-By: Konstantin Käfer <mail@kkaefer.com>
Co-Authored-By: Anand Thakker <anandthakker@users.noreply.github.com>
Co-Authored-By: Minh Nguyễn <1ec5@users.noreply.github.com>
|
|
|
|
| |
Support for VAO extensions is broken.
|
| |
|
| |
|
|
|
|
| |
This reverts commit e350ef37fe68312c4b5fb03b289a90c0bdda4f03.
|
| |
|
|
|
|
| |
- This enables the use case where the system already destroyed the underlying GL resources. Otherwise, the cleanup would fail and crash
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|