maptalks / maptalks/maptalks.js
Shared WebGL context
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 4.5k
- Forks
- 511
- Avg merge
- 3d 58m
- Merged PRs (30d)
- 1
Description
**maptalks's version and what browser you use?**
v0.43.0, chrome
**Issue description**
Layers do not share WebGL context, which creates glitches when a map has more than one 3d layer. For example a buildings layer with a 3D line will not hide the line behind the buildings.
In particular, I am implementing a 3D terrain layer but this layer will not hide (behind mountains) any other 3d element in the map, such as buildings.
**Please provide a reproduction URL (on any jsfiddle like site)**
The following example fraws two vector layers. Due to the WebGL context not being shared, the rendering is wrong.
[http://jsfiddle.net/h6z5jtky/2/](http://jsfiddle.net/h6z5jtky/2/)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked JSFiddle reproduction and trace how the two vector layers create and use their WebGL contexts. Confirm the rendering behavior with a buildings layer and a 3D line or terrain layer; done means 3D elements are correctly occluded across layers, including lines behind buildings or mountains.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100