From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../webglrenderingcontext/deletetexture/index.html | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 files/zh-cn/web/api/webglrenderingcontext/deletetexture/index.html (limited to 'files/zh-cn/web/api/webglrenderingcontext/deletetexture') diff --git a/files/zh-cn/web/api/webglrenderingcontext/deletetexture/index.html b/files/zh-cn/web/api/webglrenderingcontext/deletetexture/index.html new file mode 100644 index 0000000000..1871f5384f --- /dev/null +++ b/files/zh-cn/web/api/webglrenderingcontext/deletetexture/index.html @@ -0,0 +1,75 @@ +--- +title: WebGLRenderingContext.deleteTexture() +slug: Web/API/WebGLRenderingContext/deleteTexture +translation_of: Web/API/WebGLRenderingContext/deleteTexture +--- +
{{APIRef("WebGL")}}
+ +
WebGLRenderingContext.deleteTexture()方法删除指定的{{domxref("WebGLTexture")}}对象。如果纹理已被删除,则此方法无效。
+ + + +

Syntax

+ +
void gl.deleteTexture(texture);
+
+ +

Parameters

+ +
+
texture
+
将要删除的{{domxref("WebGLTexture")}} 对象.
+
+ +

Return value

+ +

无.

+ +

Examples

+ +

Deleting a texture

+ +
var canvas = document.getElementById('canvas');
+var gl = canvas.getContext('webgl');
+var texture = gl.createTexture();
+
+// ...
+
+gl.deleteTexture(texture);
+ +

Specifications

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('WebGL', "#5.14.8", "deleteTexture")}}{{Spec2('WebGL')}}Initial definition.
{{SpecName('OpenGL ES 2.0', "glDeleteTextures.xml", "glDeleteTextures")}}{{Spec2('OpenGL ES 2.0')}}Man page of the (similar) OpenGL API.
+ +

Browser compatibility

+ + + +

{{Compat("api.WebGLRenderingContext.deleteTexture")}}

+ +

See also

+ + -- cgit v1.2.3-54-g00ecf