@@ -1542,23 +1542,20 @@ class RenderWebGL extends EventEmitter {
1542
1542
const skin = /** @type {PenSkin } */ this . _allSkins [ penSkinID ] ;
1543
1543
1544
1544
const gl = this . _gl ;
1545
- twgl . bindFramebufferInfo ( gl , this . _queryBufferInfo ) ;
1545
+ twgl . bindFramebufferInfo ( gl , skin . _framebuffer ) ;
1546
1546
1547
1547
// Limit size of viewport to the bounds around the stamp Drawable and create the projection matrix for the draw.
1548
- gl . viewport ( 0 , 0 , bounds . width , bounds . height ) ;
1548
+ gl . viewport (
1549
+ ( this . _nativeSize [ 0 ] * 0.5 ) + bounds . left ,
1550
+ ( this . _nativeSize [ 1 ] * 0.5 ) - bounds . top ,
1551
+ bounds . width ,
1552
+ bounds . height
1553
+ ) ;
1549
1554
const projection = twgl . m4 . ortho ( bounds . left , bounds . right , bounds . top , bounds . bottom , - 1 , 1 ) ;
1550
1555
1551
- gl . clearColor ( 0 , 0 , 0 , 0 ) ;
1552
- gl . clear ( gl . COLOR_BUFFER_BIT ) ;
1553
-
1554
- try {
1555
- gl . disable ( gl . BLEND ) ;
1556
- this . _drawThese ( [ stampID ] , ShaderManager . DRAW_MODE . stamp , projection , { ignoreVisibility : true } ) ;
1557
- } finally {
1558
- gl . enable ( gl . BLEND ) ;
1559
- }
1560
-
1561
- skin . _drawToBuffer ( this . _queryBufferInfo . attachments [ 0 ] , bounds . left , bounds . top ) ;
1556
+ // Draw the stamped sprite onto the PenSkin's framebuffer.
1557
+ this . _drawThese ( [ stampID ] , ShaderManager . DRAW_MODE . stamp , projection , { ignoreVisibility : true } ) ;
1558
+ skin . _silhouetteDirty = true ;
1562
1559
}
1563
1560
1564
1561
/* ******
0 commit comments