The following types are used in WebGL 接口。

WebGL 1

These types are used within a WebGLRenderingContext .

类型 Web IDL 类型 描述
GLenum unsigned long Used for enums. See also the list of constants .
GLboolean boolean A 布尔 .
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.

类型 Web IDL 类型 描述
GLint64 long long Signed 64-bit integer number.

WebGL extensions

These types are used within WebGL extensions .

类型 Web IDL 类型 描述
GLuint64EXT long long Unsigned 64-bit integer number.

规范

规范 状态 注释
WebGL 1.0
The definition of 'Types' in that specification.
推荐 初始定义
WebGL 2.0
The definition of 'Types' in that specification.
编者草案 Defines additional types.
EXT_disjoint_timer_query
The definition of 'GLuint64EXT' in that specification.
工作草案 添加 GLuint64EXT

另请参阅

元数据

  • 最后修改: