A RetroSearch Logo

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

Search Query:

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

WebGLRenderingContext: drawElements() method - Web APIs

WebGLRenderingContext: drawElements() method

Baseline Widely available

Note: This feature is available in Web Workers.

The WebGLRenderingContext.drawElements() method of the WebGL API renders primitives from array data.

Syntax
drawElements(mode, count, type, offset)
Parameters
mode

A GLenum specifying the type primitive to render. Possible values are:

count

A GLsizei specifying the number of elements of the bound element array buffer to be rendered. For example, to draw a wireframe triangle with gl.LINES the count should be 2 endpoints per line × 3 lines = 6 elements. However to draw the same wireframe triangle with gl.LINE_STRIP the element array buffer does not repeat the indices for the end of the first line/start of the second line, and end of the second line/start of the third line, so count will be four. To draw the same triangle with gl.LINE_LOOP the element array buffer does not repeat the first/last vertex either so count will be three.

type

A GLenum specifying the type of the values in the element array buffer. Possible values are:

When using the OES_element_index_uint extension:

offset

A GLintptr specifying a byte offset in the element array buffer. Must be a valid multiple of the size of the given type.

Return value

None (undefined).

Exceptions Examples
gl.drawElements(gl.POINTS, 8, gl.UNSIGNED_BYTE, 0);
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