A RetroSearch Logo

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

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/createShader below:

WebGLRenderingContext: createShader() method - Web APIs

WebGLRenderingContext: createShader() method

Baseline Widely available

Note: This feature is available in Web Workers.

The WebGLRenderingContext method createShader() of the WebGL API creates a WebGLShader that can then be configured further using WebGLRenderingContext.shaderSource() and WebGLRenderingContext.compileShader().

Syntax Parameters
type

Either gl.VERTEX_SHADER or gl.FRAGMENT_SHADER. The WebGLRenderingContext will set the gl.INVALID_ENUM error flag if an unacceptable value has been specified.

Return value

A new WebGLShader instance, or null if an error occurs creating the shader (for example, because type was an invalid value).

Examples

See WebGLShader for usage and examples.

Specifications Browser compatibility 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