| 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 RenderSurfaceBase is the base for RenderSurface and | 34 * A RenderSurfaceBase is the base for RenderSurface and |
| 35 * RenderDepthStencilSurface. | 35 * RenderDepthStencilSurface. |
| 36 * | 36 * |
| 37 * @param {number} width The width of this RenderSurface. | 37 * @param {number} width The width of this RenderSurface. |
| 38 * @param {number} height The height of this RenderSurface. | 38 * @param {number} height The height of this RenderSurface. |
| 39 * @param {o3d.Texture} texture The texture of this RenderSurface. | 39 * @param {o3d.Texture} texture The texture of this RenderSurface. |
| 40 * @constructor | 40 * @constructor |
| 41 */ | 41 */ |
| 42 o3d.RenderSurfaceBase = function(width, height, texture) { | 42 o3d.RenderSurfaceBase = function(width, height, texture) { |
| 43 o3d.ParamObject.call(this); | 43 o3d.ParamObject.call(this); |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * The width of the surface, in pixels. | 46 * The width of the surface, in pixels. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 */ | 129 */ |
| 130 o3d.RenderDepthStencilSurface.prototype.initWithSize_ = | 130 o3d.RenderDepthStencilSurface.prototype.initWithSize_ = |
| 131 function(width, height) { | 131 function(width, height) { |
| 132 this.depth_stencil_buffer_ = this.gl.createRenderbuffer(); | 132 this.depth_stencil_buffer_ = this.gl.createRenderbuffer(); |
| 133 this.gl.bindRenderbuffer(this.gl.RENDERBUFFER, this.depth_stencil_buffer_); | 133 this.gl.bindRenderbuffer(this.gl.RENDERBUFFER, this.depth_stencil_buffer_); |
| 134 this.gl.renderbufferStorage( | 134 this.gl.renderbufferStorage( |
| 135 this.gl.RENDERBUFFER, this.gl.DEPTH_COMPONENT16, width, height); | 135 this.gl.RENDERBUFFER, this.gl.DEPTH_COMPONENT16, width, height); |
| 136 this.width = width; | 136 this.width = width; |
| 137 this.height = height; | 137 this.height = height; |
| 138 }; | 138 }; |
| OLD | NEW |