Skip to content

Commit 7aef7dd

Browse files
little-csdstevecai
and
stevecai
authored
fix typo: DEPTH_BUFFER_BITS => DEPTH_BUFFER_BIT (WebGLSamples#165)
* fix typo: DEPTH_BUFFER_BITS => DEPTH_BUFFER_BIT * add clear depth buffer for demo 'glsl_flat_smooth_interpolators' Co-authored-by: stevecai <[email protected]>
1 parent 2d148ed commit 7aef7dd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: samples/glsl_flat_smooth_interpolators.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
// -- Render loop
261261
(function render() {
262262
gl.clearColor(0.0, 0.0, 0.0, 1.0);
263-
gl.clear(gl.COLOR_BUFFER_BIT);
263+
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
264264

265265
mat4.rotateY(modelView, modelView, rotatationSpeedY);
266266

Diff for: samples/query_occlusion.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595

9696
// -- Render
9797
gl.clearColor(0.0, 0.0, 0.0, 1.0);
98-
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BITS);
98+
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
9999

100100
gl.bindVertexArray(vertexArray);
101101

0 commit comments

Comments
 (0)