remove memory leak
This commit is contained in:
parent
9714088a38
commit
4b5b13452b
|
@ -5,7 +5,7 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="generator" content="by-hand" />
|
<meta name="generator" content="by-hand" />
|
||||||
<meta name="viewpost" context="width=device-width, inital-scale=1.0, user-scalable=yes" />
|
<meta name="viewpost" context="width=device-width, inital-scale=1.0, user-scalable=yes" />
|
||||||
<title>WebGL test</title>
|
<title>WebGL waves</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<canvas id="glCanvas"></canvas>
|
<canvas id="glCanvas"></canvas>
|
||||||
|
|
2
main.js
2
main.js
|
@ -160,6 +160,8 @@ async function run() {
|
||||||
const vertexCount = 4;
|
const vertexCount = 4;
|
||||||
gl.drawArrays(gl.TRIANGLE_STRIP, offset, vertexCount);
|
gl.drawArrays(gl.TRIANGLE_STRIP, offset, vertexCount);
|
||||||
|
|
||||||
|
drawable.free();
|
||||||
|
|
||||||
window.requestAnimationFrame(drawMe);
|
window.requestAnimationFrame(drawMe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue