Search completed in 1.15 seconds.
WebGLRenderingContext.texImage2D() - Web APIs
he level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. internalformat a glenum specifying the color components in the texture. ...
...level n is the nth mipmap reduction level. internalformat a glenum specifying the color components in the texture. ...
...mat a glenum specifying the color components in the texture. ...
...And 6 more matches
Type conversion
integer/float types are implicitly convertible if any data of source type could be representable in the target type. note that the following table does not contain environment dependent types (ctypes.long, etc.). ...
.... note that the following table does not contain environment dependent types (ctypes.long, etc.). ...
...ctypes.short ctypes.uint16_t ctypes.uint8_t ctypes.
unsigned_short ctypes.short ctypes.int8_t ctypes.uint8_t ctypes.int16_t ctypes.
unsigned_short ctypes.uint8_t ctypes.uint16_t ctypes.int32_t ctypes.int8_t ctypes.uint8_t ctypes.int16_t ctypes.uint16_t ctypes.short ctypes.
unsigned_short ctypes.int ctypes.uint32_t ctypes.uint8_t ctypes.uint16_t ctypes.
unsigned_short ctypes.unsigned_int ctypes.int ctypes.int8_t ctypes.uint8_t ctypes.int16_t ctypes.uint16_t ctypes.short ctypes.
unsigned_short ctypes.int32_t ctypes.unsigned_int ctypes.uint8_t ctypes.u...
...And 4 more matches
WebGL2RenderingContext.texSubImage3D() - Web APIs
16f gl.r32f gl.r8ui gl.rg8 gl.rg16f gl.rg32f gl.rgui gl.rgb8 gl.srgb8 gl.rgb565 gl.r11f_g11f_b10f gl.rgb9_e5 gl.rgb16f gl.rgb32f gl.rgb8ui gl.rgba8 gl.srgb_aplha8 gl.rgb5_a1 gl.rgba4444 gl.rgba16f gl.rgba32f gl.rgba8ui type a glenum specifying the data type of the texel data. ...
... gl.rgb8 gl.srgb8 gl.rgb565 gl.r11f_g11f_b10f gl.rgb9_e5 gl.rgb16f gl.rgb32f gl.rgb8ui gl.rgba8 gl.srgb_aplha8 gl.rgb5_a1 gl.rgba4444 gl.rgba16f gl.rgba32f gl.rgba8ui type a glenum specifying the data type of the texel data. possible values: gl.unsigned_byte: 8 bits per channel for gl.rgba gl.
unsigned_short_5_6_5: 5 red bits, 6 green bits, 5 blue bits. gl.
unsigned_short_4_4_4_4: 4 red bits, 4 green bits, 4 blue bits, 4 alpha bits. ...
...rgb32f gl.rgb8ui gl.rgba8 gl.srgb_aplha8 gl.rgb5_a1 gl.rgba4444 gl.rgba16f gl.rgba32f gl.rgba8ui type a glenum specifying the data type of the texel data. possible values: gl.unsigned_byte: 8 bits per channel for gl.rgba gl.
unsigned_short_5_6_5: 5 red bits, 6 green bits, 5 blue bits. gl.
unsigned_short_4_4_4_4: 4 red bits, 4 green bits, 4 blue bits, 4 alpha bits. gl.
unsigned_short_5_5_5_1: 5 red bits, 5 green bits, 5 blue bits, 1 alpha bit. ...
...And 2 more matches
WebGL2RenderingContext.texImage3D() - Web APIs
of the texture. depth a glsizei specifying the depth of the texture. border a glint specifying the width of the border. must be 0. format a glenum specifying the format of the texel data. the correct combinations with internalformat are listed in this table. type a glenum specifying the data type of the texel data. ...
...ure. border a glint specifying the width of the border. must be 0. format a glenum specifying the format of the texel data. the correct combinations with internalformat are listed in this table. type a glenum specifying the data type of the texel data. possible values: gl.unsigned_byte: 8 bits per channel for gl.rgba gl.
unsigned_short_5_6_5: 5 red bits, 6 green bits, 5 blue bits. gl.
unsigned_short_4_4_4_4: 4 red bits, 4 green bits, 4 blue bits, 4 alpha bits. ...
...enum specifying the format of the texel data. the correct combinations with internalformat are listed in this table. type a glenum specifying the data type of the texel data. possible values: gl.unsigned_byte: 8 bits per channel for gl.rgba gl.
unsigned_short_5_6_5: 5 red bits, 6 green bits, 5 blue bits. gl.
unsigned_short_4_4_4_4: 4 red bits, 4 green bits, 4 blue bits, 4 alpha bits. gl.
unsigned_short_5_5_5_1: 5 red bits, 5 green bits, 5 blue bits, 1 alpha bit. ...
...are listed in this table. type a glenum specifying the data type of the texel data. possible values: gl.unsigned_byte: 8 bits per channel for gl.rgba gl.
unsigned_short_5_6_5: 5 red bits, 6 green bits, 5 blue bits. gl.
unsigned_short_4_4_4_4: 4 red bits, 4 green bits, 4 blue bits, 4 alpha bits. gl.
unsigned_short_5_5_5_1: 5 red bits, 5 green bits, 5 blue bits, 1 alpha bit. ...
WebGLRenderingContext.readPixels() - Web APIs
the alpha component. gl.rgb: discards the alpha components and reads the red, green and blue components. gl.rgba: red, green, blue and alpha components are read from the color buffer. webgl2 adds gl.red gl.rg gl.red_integer gl.rg_integer gl.rgb_integer gl.rgba_integer type a glenum specifying the data type of the pixel data. possible values: gl.unsigned_byte gl.
unsigned_short_5_6_5 gl.
unsigned_short_4_4_4_4 gl.
unsigned_short_5_5_5_1 gl.float webgl2 adds gl.byte gl.unsigned_int_2_10_10_10_rev gl.half_float gl.short gl.
unsigned_short gl.int gl.unsigned_int gl.unsigned_int_10f_11f_11f_rev gl.unsigned_int_5_9_9_9_rev pixels an arraybufferview object to read data into. the array type must match the type of the type parameter. uint8a...
..._short_5_5_5_1 gl.float webgl2 adds gl.byte gl.unsigned_int_2_10_10_10_rev gl.half_float gl.short gl.
unsigned_short gl.int gl.unsigned_int gl.unsigned_int_10f_11f_11f_rev gl.unsigned_int_5_9_9_9_rev pixels an arraybufferview object to read data into. the array type must match the type of the type parameter. uint8array for gl.unsigned_byte. uint16array for gl.
unsigned_short_5_6_5, gl.
unsigned_short_4_4_4_4, or gl.
unsigned_short_5_5_5_1. float32array for gl.float. dstoffset optional offset. defaults to 0. return value none. exceptions a gl.invalid_enum error is thrown if format or type is not an accepted value. ...
... type does not match the typed array type of pixels. a gl.invalid_framebuffer_operation error is thrown if the currently bound framebuffer is not framebuffer complete. ...
... type does not match the typed array type of pixels. a gl.invalid_framebuffer_operation error is thrown if the currently bound framebuffer is not framebuffer complete. ...
WebGLRenderingContext.vertexAttribPointer() - Web APIs
be modified. size a glint specifying the number of components per vertex attribute. must be 1, 2, 3, or 4. type a glenum specifying the data type of each component in the array. possible values: gl.byte: signed 8-bit integer, with values in [-128, 127] gl.short: signed 16-bit integer, with values in [-32768, 32767] gl.unsigned_byte: unsigned 8-bit integer, with values in [0, 255] gl.
unsigned_short: unsigned 16-bit integer, with values in [0, 65535] gl.float: 32-bit ieee floating point number when using a webgl 2 context, the following values are available additionally: gl.half_float: 16-bit ieee floating point number normalized a glboolean specifying whether integer data values should be normalized into a certain range when being cast to a float. for types gl.b...
...er when using a webgl 2 context, the following values are available additionally: gl.half_float: 16-bit ieee floating point number normalized a glboolean specifying whether integer data values should be normalized into a certain range when being cast to a float. for types gl.byte and gl.short, normalizes the values to [-1, 1] if true. for types gl.unsigned_byte and gl.
unsigned_short, normalizes the values to [0, 1] if true. for types gl.float and gl.half_float, this parameter has no effect. stride a glsizei specifying the offset in bytes between the beginning of consecutive vertex attributes. cannot be larger than 255. if stride is 0, the attribute is assumed to be tightly packed, that is, the attributes are not interleaved but each attribute is in a separate block, ...
...r, either by setting the index ourselves: //describe the layout of the buffer: //1. position, not normalized gl.vertexattribpointer(0, 3, gl.float, false, 20, 0); gl.enablevertexattribarray(0); //2. normal vector, normalized to [-1, 1] gl.vertexattribpointer(1, 4, gl.byte, true, 20, 12); gl.enablevertexattribarray(1); //3. ...
... recommendation initial definition. opengl es 2.0the definition of 'glvertexattribpointer' in that specification. standard man page of the opengl api. ...
WebGL constants - Web APIs
x1102 the most correct or the highest quality option should be used. generate_mipmap_hint 0x8192 hint for the quality of filtering when generating mipmap images with webglrenderingcontext.generatemipmap(). ...
... vertex_shader ...
... vertex_shader 0x8b31 passed to createshader to define a...
... vertex_shader 0x8b31 passed to createshader to define a vertex shader compile_status 0x8b8...
WebGLRenderingContext.texSubImage2D() - Web APIs
ext_srgb extension: ext.srgb_ext ext.srgb_alpha_ext when using a webgl 2 context, the following values are available additionally: gl.red gl.rg gl.red_integer gl.rg_integer gl.rgb_integer gl.rgba_integer type a glenum specifying the data type of the texel data. possible values: gl.unsigned_byte: 8 bits per channel for gl.rgba gl.
unsigned_short_5_6_5: 5 red bits, 6 green bits, 5 blue bits. gl.
unsigned_short_4_4_4_4: 4 red bits, 4 green bits, 4 blue bits, 4 alpha bits. gl.
unsigned_short_5_5_5_1: 5 red bits, 5 green bits, 5 blue bits, 1 alpha bit. when using the oes_texture_float extension: gl.float when using the oes_texture_half_float extension: gl.half_float_oes when using a webgl 2 context, the ...
..._4_4_4: 4 red bits, 4 green bits, 4 blue bits, 4 alpha bits. gl.
unsigned_short_5_5_5_1: 5 red bits, 5 green bits, 5 blue bits, 1 alpha bit. ...
...2_10_10_10_rev gl.unsigned_int_10f_11f_11f_rev gl.unsigned_int_5_9_9_9_rev gl.unsigned_int_24_8 gl.float_32_unsigned_int_24_8_rev (pixels must be null) pixels one of the following objects can be used as a pixel source for the texture: arraybufferview, a uint8array must be used if type is gl.unsigned_byte. a uint16array must be used if type is either gl.
unsigned_short_5_6_5, gl.
unsigned_short_4_4_4_4, gl.
unsigned_short_5_5_5_1, or ext.half_float_oes. a float32array must be used if type is gl.float. imagedata, htmlimageelement, htmlcanvaselement, htmlvideoelement, imagebitmap. offset (webgl 2 only) a glintptr byte offset into the webglbuffer's data store. used to upload data to the currently bound webgltexture from the webglbuffer bou...
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
nd connects the last vertex back to the first. gl.lines: draws a line between a pair of vertices. gl.triangle_strip gl.triangle_fan gl.triangles: draws a triangle for a group of three vertices. count a glsizei specifying the number of elements to be rendered. type a glenum specifying the type of the values in the element array buffer. possible values are: gl.unsigned_byte gl.
unsigned_short when using the oes_element_index_uint extension: gl.unsigned_int offset a glintptr specifying an offset in the element array buffer. must be a valid multiple of the size of the given type. primcount a glsizei specifying the number of instances of the set of elements to execute. return value none. exceptions if mode is not one of the accepted values, a gl.invalid_en...
...urn value none. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if offset is a invalid multiple of the size of the given type, a gl.invalid_operation error is thrown. if count or primcount are negative, a gl.invalid_value error is thrown. examples var ext = gl.getextension('angle_instanced_arrays'); ext.drawelementsinstancedangle(gl.points, 2, gl.
unsigned_short, 0, 4); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification. recommendation initial definition. ...
WEBGL_depth_texture - Web APIs
efault. the constant in webgl2 is gl.unsigned_int_24_8. constants this extension adds a new constant: ext.unsigned_int_24_8_webgl unsigned integer type for 24-bit depth texture data. extended methods this extension extends webglrenderingcontext.teximage2d(): the format and internalformat parameters now accept gl.depth_component and gl.depth_stencil. the type parameter now accepts gl.
unsigned_short, gl.unsigned_int, and ext.unsigned_int_24_8_webgl. the pixels parameter now accepts an arraybufferview of type uint16array and uint32array. this extension extends webglrenderingcontext.framebuffertexture2d(): the attachment parameter now accepts gl.depth_stencil_attachment. incorrectly stated as the target parameter in the specification, see https://www.khronos.org/bugzilla/show_bug.cgi?
...tends webglrenderingcontext.framebuffertexture2d(): the attachment parameter now accepts gl.depth_stencil_attachment. incorrectly stated as the target parameter in the specification, see https://www.khronos.org/bugzilla/show_bug.cgi?id=674. examples var ext = gl.getextension('webgl_depth_texture'); gl.teximage2d(gl.texture_2d, 0, gl.depth_component, 512, 512, 0, gl.depth_component, gl.
unsigned_short, null); specifications specification status comment webgl_depth_texturethe definition of 'webgl_depth_texture' in that specification. recommendation initial definition. ...
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
nd connects the last vertex back to the first. gl.lines: draws a line between a pair of vertices. gl.triangle_strip gl.triangle_fan gl.triangles: draws a triangle for a group of three vertices. count a glsizei specifying the number of elements to be rendered. type a glenum specifying the type of the values in the element array buffer. possible values are: gl.unsigned_byte gl.
unsigned_short when using the oes_element_index_uint extension: gl.unsigned_int offset a glintptr specifying an offset in the element array buffer. must be a valid multiple of the size of the given type. instancecount a glsizei specifying the number of instances of the set of elements to execute. return value none. exceptions if mode is not one of the accepted values, a gl.invali...
...ber of instances of the set of elements to execute. return value none. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if offset is a valid multiple of the size of the given type, a gl.invalid_operation error is thrown. if count or instancecount are negative, a gl.invalid_value error is thrown. examples gl.drawelementsinstanced(gl.points, 2, gl.
unsigned_short, 0, 4); specifications specification status comment webgl 2.0the definition of 'drawelementsinstanced' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gldrawelementsinstanced' in that specification. standard man page of the (similar) opengl api. ...
ctypes
cts. see 64-bit integers for details. types that act like specific c types these types are designed to work exactly like the corresponding type on the native platform. type description bool a boolean type that behaves like the corresponding c type on the platform. short a short integer type that behaves like the corresponding c type on the platform.
unsigned_short an unsigned short integer type that behaves like the corresponding c type on the platform. int an integer type that behaves like the int c type on the platform. unsigned_int an unsigned integer type that behaves like the unsigned int c type on the platform. long a long integer type that behaves like the corresponding c type on the platform. no...
WebGL2RenderingContext.drawRangeElements() - Web APIs
riangles: draws a triangle for a group of three vertices. start a gluint specifying the minimum array index contained in offset. end a gluint specifying the maximum array index contained in offset. count a glsizei specifying the number of elements to be rendered. type a glenum specifying the type of the values in the element array buffer. possible values are: gl.unsigned_byte gl.
unsigned_short gl.unsigned_int offset a glintptr specifying an offset in the element array buffer. must be a valid multiple of the size of the given type. return value none. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if offset is a valid multiple of the size of the given type, a gl.invalid_operation error is thrown. if count is negative, a gl.invali...
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
syntax void gl.vertexattribipointer(index, size, type, stride, offset); parameters index a gluint specifying the index of the vertex attribute that is to be modified. size a glint specifying the number of components per vertex attribute. must be 1, 2, 3, or 4. type a glenum specifying the data type of each component in the array. must be one of: gl.byte, gl.unsigned_byte, gl.short, gl.
unsigned_short, gl.int, or gl.unsigned_int. stride a glsizei specifying the offset in bytes between the beginning of consecutive vertex attributes. offset a glintptr specifying an offset in bytes of the first component in the vertex attribute array. must be a multiple of type. return value none. description very similar to webglrenderingcontext.vertexattribpointer(). the main difference is that while v...
WebGLRenderingContext.drawElements() - Web APIs
nd connects the last vertex back to the first. gl.lines: draws a line between a pair of vertices. gl.triangle_strip gl.triangle_fan gl.triangles: draws a triangle for a group of three vertices. count a glsizei specifying the number of elements to be rendered. type a glenum specifying the type of the values in the element array buffer. possible values are: gl.unsigned_byte gl.
unsigned_short when using the oes_element_index_uint extension: gl.unsigned_int 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. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if offset is not a valid multiple of the size of the given type, a ...
WebGLRenderingContext.getVertexAttrib() - Web APIs
x_attrib_array_size: returns a glint indicating the size of an element of the vertex array. gl.vertex_attrib_array_stride: returns a glint indicating the number of bytes between successive elements in the array. 0 means that the elements are sequential. gl.vertex_attrib_array_type: returns a glenum representing the array type. one of gl.byte, gl.unsigned_byte, gl.short, gl.
unsigned_short, gl.float. gl.vertex_attrib_array_normalized: returns a glboolean that is true if fixed-point data types are normalized for the vertex attribute array at the given index. gl.current_vertex_attrib: returns a float32array (with 4 elements) representing the current value of the vertex attribute at the given index. when using a webgl 2 context, the following values are available addi...
Creating 3D objects using WebGL - Web APIs
the cube is described as a collection of 12 triangles. drawing the cube next we need to add code to our drawscene() function to draw using the cube's index buffer, adding new gl.bindbuffer() and gl.drawelements() calls: // tell webgl which indices to use to index the vertices gl.bindbuffer(gl.element_array_buffer, buffers.indices); ... { const vertexcount = 36; const type = gl.
unsigned_short; const offset = 0; gl.drawelements(gl.triangles, vertexcount, type, offset); } since each face of our cube is comprised of two triangles, there are 6 vertices per side, or 36 total vertices in the cube, even though many of them are duplicates. finally, let's replace our variable squarerotation by cuberotation and add a second rotation around the x axis: mat4.rotate(modelviewmatrix,...