Commit b82c47d
Use shader attributes for solid polygon layer (visgl#2703)
#### Background
Use `shaderAttributes` to replace SolidPolygonLayer attribute hijacking in `updateAttributes`.
#### Change List
- Use new `shaderAttributes` instead of creating new attributes in `updateAttributes`. The `updateAttributes` override is is still necessary to switch to instance drawing for the sides.
- Update vertex shader module for SolidPolygonLayer to inject source code instead of branching. Was necessary to prevent the topModel from trying to access attributes it doesn't use.1 parent ccd741c commit b82c47d
File tree
2 files changed
+55
-40
lines changed- modules/layers/src/solid-polygon-layer
2 files changed
+55
-40
lines changedLines changed: 21 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | | - | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
66 | | - | |
| 70 | + | |
67 | 71 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
Lines changed: 34 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| |||
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
90 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
91 | 119 | | |
92 | | - | |
93 | 120 | | |
94 | 121 | | |
95 | 122 | | |
| |||
228 | 255 | | |
229 | 256 | | |
230 | 257 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | 258 | | |
246 | 259 | | |
247 | 260 | | |
| |||
255 | 268 | | |
256 | 269 | | |
257 | 270 | | |
258 | | - | |
| 271 | + | |
259 | 272 | | |
260 | 273 | | |
261 | 274 | | |
262 | 275 | | |
263 | | - | |
264 | | - | |
265 | | - | |
| 276 | + | |
266 | 277 | | |
267 | 278 | | |
268 | 279 | | |
| |||
278 | 289 | | |
279 | 290 | | |
280 | 291 | | |
281 | | - | |
| 292 | + | |
282 | 293 | | |
283 | 294 | | |
284 | 295 | | |
| |||
0 commit comments