Skip to content

Commit

Permalink
Pixi updates
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed Jul 10, 2014
1 parent 248a750 commit 73e8a97
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/pixi/renderers/webgl/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy acce
* @param view {HTMLCanvasElement} the canvas to use as a view, optional
* @param transparent=false {Boolean} If the render view is transparent, default false
* @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment)
* @param preserveDrawingBuffer=false {Boolean} enables drawing buffer preservation, enable this if you need to call toDataUrl on the webgl context
*
*/
PIXI.WebGLRenderer = function(width, height, view, transparent, antialias)
PIXI.WebGLRenderer = function(width, height, view, transparent, antialias, preserveDrawingBuffer)
{
if(!PIXI.defaultRenderer)
{
Expand All @@ -38,6 +39,14 @@ PIXI.WebGLRenderer = function(width, height, view, transparent, antialias)
*/
this.transparent = !!transparent;

/**
* The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.
*
* @property preserveDrawingBuffer
* @type Boolean
*/
this.preserveDrawingBuffer = preserveDrawingBuffer;

/**
* The width of the canvas view
*
Expand Down Expand Up @@ -77,7 +86,8 @@ PIXI.WebGLRenderer = function(width, height, view, transparent, antialias)
alpha: this.transparent,
antialias:!!antialias, // SPEED UP??
premultipliedAlpha:!!transparent,
stencil:true
stencil:true,
preserveDrawingBuffer: preserveDrawingBuffer
};

var gl = null;
Expand Down

0 comments on commit 73e8a97

Please sign in to comment.