A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/zh-CN/docs/Web/API/WebGLRenderingContext/validateProgram below:

WebGLRenderingContext.validateProgram() - Web API | MDN

WebGLRenderingContext.validateProgram()

Baseline Widely available

WebGLRenderingContext.validateProgram() 是一种 WebGL API ,主要是用来验证 WebGLProgram。它在检查 WebGLProgram 程序是否链接成功的同时还会检查其是否能在当前的 WebGL 中使用。

语法
void gl.validateProgram(program);
参数 返回值

None.

Examples
var program = gl.createProgram();

// Attach pre-existing shaders
gl.attachShader(program, vertexShader);
gl.attachShader(program, fragmentShader);

gl.linkProgram(program);
gl.validateProgram(program);

if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
  var info = gl.getProgramInfoLog(program);
  throw "不能编译 WebGL 程序。\n\n" + info;
}

gl.useProgram(program);
规范 浏览器兼容性 See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4