EN
此内容没有您的语言版本,但有英语版本。

preserveDrawingBuffer property

Sets or gets whether the drawing buffer's is cleared once content is presented.

IE11

 

Syntax

JScript
preservedrawingbuffer = object.preserveDrawingBuffer

 

Property values

Type: Boolean

ValueCondition
true

Drawing buffer is preserved. Default.

false

Drawing buffer is cleared.

 

Remarks

The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.

Examples

This example uses preserveDrawingBuffer to preserve the contents of the buffer in the call to getContext. For more info on this example, see Get started with WebGL.


  // Use preserveDrawingBuffer:true to keep the drawing buffer after presentation
  var gl = this.gl = canvas.getContext("experimental-webgl", { preserveDrawingBuffer: true });


See also

WebGLContextAttributes

 

 

显示:
© 2014 Microsoft