Skip to content

Commit 90785fc

Browse files
committed
CHANGELIST
1 parent cceaa19 commit 90785fc

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

CHANGELIST.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
# Change List
22

3+
* 6.0.0
4+
5+
Internal change. `gl.pixelStorei` state for `UNPACK_COLORSPACE_CONVERSION_WEBGL`
6+
`UNPACK_PREMULTIPLY_ALPHA_WEBGL` and `UNPACK_FLIP_Y_WEBGL`
7+
is now saved and restored as the previous behavior had a race condition.
8+
9+
Before v6.0.0
10+
11+
```js
12+
t1 = twgl.createTexture(gl, {src: 'https://p.com/slow.jpg'}); // may or may not be flipped!!!!
13+
t2 = twgl.createTexture(gl, {src: 'https://p.com/fast.jpg', flipY: true }); // flipped
14+
```
15+
16+
In the example above, whether or not `t1` is flipped was unknown
17+
since if `t2` loads first, it would be flipped. If `t1` loads first
18+
it would not be flipped.
19+
20+
The fix is to save and restore the `pixelStorei` state for each texture.
21+
22+
Unfortunately, this is a breaking change.
23+
24+
Before v6.0.0
25+
26+
```js
27+
twgl.createTexture(gl, {src: someImageElem1, flipY: true }); // flipped
28+
twgl.createTexture(gl, {src: someImageElem2 }); // also flipped
29+
```
30+
31+
From v6.0.0 on
32+
33+
```js
34+
twgl.createTexture(gl, {src: someImage, flipY: true }); // flipped
35+
twgl.createTexture(gl, {src: someImage }); // NOT flipped
36+
```
37+
38+
Note: in all versions the behavior was and still is, that if you set
39+
the `pixelStorei` parameters outside they applied.
40+
41+
```js
42+
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true)
43+
twgl.createTexture(gl, {src: someImage }); // flipped
44+
twgl.createTexture(gl, {src: someImage }); // flipped
45+
```
46+
347
* 5.6.0
448

549
Support offsets and shared buffers in uniform block infos.

0 commit comments

Comments
 (0)