OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010, Google Inc. | 2 * Copyright 2010, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 15 matching lines...) Expand all Loading... |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 | 32 |
33 /** | 33 /** |
34 * A ClearBuffer is a render node that clears the color buffer, zbuffer and/or | 34 * A ClearBuffer is a render node that clears the color buffer, zbuffer and/or |
35 * stencil buffer of the current render target. | 35 * stencil buffer of the current render target. |
36 * | 36 * |
37 * @constructor | 37 * @constructor |
38 */ | 38 */ |
39 o3d.ClearBuffer = function() { | 39 o3d.ClearBuffer = function() { |
40 o3d.RenderNode.call(this); | 40 o3d.RenderNode.call(this); |
41 /** | 41 /** |
42 * The color to clear the buffer in RGBA Float4 format. | 42 * The color to clear the buffer in RGBA Float4 format. |
43 * @type {!o3d.Float4} | 43 * @type {!o3d.Float4} |
44 */ | 44 */ |
45 this.clearColor = [0, 0, 0, 1]; | 45 this.clearColor = [0, 0, 0, 1]; |
46 | 46 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 if (this.clearDepthFlag) | 111 if (this.clearDepthFlag) |
112 flags = flags | this.gl.DEPTH_BUFFER_BIT; | 112 flags = flags | this.gl.DEPTH_BUFFER_BIT; |
113 if (this.clearStencilFlag) | 113 if (this.clearStencilFlag) |
114 flags = flags | this.gl.STENCIL_BUFFER_BIT; | 114 flags = flags | this.gl.STENCIL_BUFFER_BIT; |
115 | 115 |
116 this.gl.clear(flags); | 116 this.gl.clear(flags); |
117 }; | 117 }; |
118 | 118 |
119 | 119 |
120 | 120 |
OLD | NEW |