Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

WebGL types

The following types are used in WebGL interfaces.

WebGL 1

These types are used within a WebGLRenderingContext.

Type Web IDL type Description
GLenum unsigned long Used for enums. See also the list of constants.
GLboolean boolean A Boolean.
GLbitfield unsigned long A bit field that stores multiple, logical bits. Used for example in WebGLRenderingContext.clear().
GLbyte byte 8-bit twos complement signed integer.
GLshort short 16-bit twos complement signed integer.
GLint long 32-bit twos complement signed integer.
GLsizei long Used for sizes (e.g. width and height of the drawing buffer).
GLintptr long long Special type for pointer arithmetic.
GLsizeiptr long long Special type for pointer arithmetic.
GLubyte octet 8-bit twos complement unsigned integer.
GLushort unsigned short 16-bit twos complement unsigned integer.
GLuint unsigned long 32-bit twos complement unsigned integer.
GLfloat unrestricted float 32-bit IEEE floating point number.
GLclampf unrestricted float Clamped 32-bit IEEE floating point number.

WebGL 2

These types are used within a WebGL2RenderingContext. All WebGL 1 types are used as well.

Type Web IDL type Description
GLint64 long long Signed 64-bit integer number.

WebGL extensions

These types are used within WebGL extensions.

Type Web IDL type Description
GLuint64EXT long long Unsigned 64-bit integer number.

Specifications

Specification Status Comment
WebGL 1.0
The definition of 'Types' in that specification.
Recommendation Initial definition
WebGL 2.0
The definition of 'Types' in that specification.
Editor's Draft Defines additional types.
EXT_disjoint_timer_query
The definition of 'GLuint64EXT' in that specification.
Working Draft Adds GLuint64EXT

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 9 4.0 (2.0) 11 12 5.1
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? 25 (Yes) ? 12 8.1

See also

Document Tags and Contributors

 Contributors to this page: fscholz, Sebastianz
 Last updated by: fscholz,