@@ -211,7 +211,7 @@ this.createjs = this.createjs||{};
211211 * @type {Boolean }
212212 * @default false
213213 */
214- this . _directDraw = directDraw === undefined ? true : false ;
214+ this . _directDraw = directDraw === undefined ? true : ( ! ! directDraw ) ;
215215
216216 /**
217217 * The width in px of the drawing surface saved in memory.
@@ -1276,6 +1276,8 @@ this.createjs = this.createjs||{};
12761276 gl . enable ( gl . BLEND ) ;
12771277 gl . pixelStorei ( gl . UNPACK_FLIP_Y_WEBGL , true ) ;
12781278 gl . clearColor ( 0.0 , 0.0 , 0.0 , 0 ) ;
1279+ gl . blendEquationSeparate ( gl . FUNC_ADD , gl . FUNC_ADD ) ;
1280+ gl . blendFuncSeparate ( gl . ONE , gl . ONE_MINUS_SRC_ALPHA , gl . ONE , gl . ONE_MINUS_SRC_ALPHA ) ;
12791281
12801282 this . _createBuffers ( ) ;
12811283 this . _initMaterials ( ) ;
@@ -2427,7 +2429,7 @@ this.createjs = this.createjs||{};
24272429 this . _activeShader = this . _mainShader ;
24282430
24292431 gl . bindFramebuffer ( gl . FRAMEBUFFER , this . _batchTextureOutput . _frameBuffer ) ;
2430- gl . clear ( gl . COLOR_BUFFER_BIT ) ;
2432+ if ( this . _batchTextureOutput . _frameBuffer !== null ) { gl . clear ( gl . COLOR_BUFFER_BIT ) ; }
24312433
24322434 this . _appendToBatch ( content , new createjs . Matrix2D ( ) , this . alpha , ignoreCache ) ;
24332435
@@ -2543,7 +2545,7 @@ this.createjs = this.createjs||{};
25432545 item . _updateState ( ) ;
25442546 }
25452547
2546- if ( ! ignoreCache && item . cacheCanvas === null && item . filters !== null && item . filters . length ) {
2548+ if ( ! this . _directDraw && ( ! ignoreCache && item . cacheCanvas === null && item . filters !== null && item . filters . length ) ) {
25472549 var bounds ;
25482550 if ( item . bitmapCache === null ) {
25492551 bounds = item . getBounds ( ) ;
0 commit comments