pub struct WEBGL_compressed_texture_s3tc_srgb(_);
Expand description

Extension

This extension exposes the sRGB compressed texture formats defined in the EXT_texture_sRGB OpenGL extension to WebGL. Compression formats COMPRESSED_SRGB_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, and COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT may be passed to the compressedTexImage2D and compressedTexSubImage2D entry points. Calling getParameter with the argument COMPRESSED_TEXTURE_FORMATS will include the 4 formats from this specification.

The following format specific restrictions must be enforced: COMPRESSED_SRGB_S3TC_DXT1_EXT COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT

The byteLength of the ArrayBufferView, pixels, passed to either compressedTexImage2D or compressedTexSubImage2D must match the following equation:

floor((width + 3) / 4) * floor((height + 3) / 4) * 8

If it is not an INVALID_VALUE error is generated.

When level equals zero width and height must be a multiple of 4. When level is greater than 0 width and height must be 0, 1, 2 or a multiple of 4.

If they are not an INVALID_OPERATION error is generated.

For compressedTexSubImage2D xoffset and yoffset must be a multiple of 4 and width must be a multiple of 4 or equal to the original width of the level. height must be a multiple of 4 or equal to the original height of the level. If they are not an INVALID_OPERATION error is generated. COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT

The byteLength of the ArrayBufferView, pixels, passed to either compressedTexImage2D or compressedTexSubImage2D must match the following equation:

floor((width + 3) / 4) * floor((height + 3) / 4) * 16

If it is not an INVALID_VALUE error is generated.

When level equals zero width and height must be a multiple of 4. When level is greater than 0 width and height must be 0, 1, 2 or a multiple of 4.

If they are not an INVALID_OPERATION error is generated.

For compressedTexSubImage2D xoffset and yoffset must be a multiple of 4 and width must be a multiple of 4 or equal to the original width of the level. height must be a multiple of 4 or equal to the original height of the level. If they are not an INVALID_OPERATION error is generated.

Implementations

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Checks whenever a given Reference if of type Self.
Converts a given reference into a concrete reference-like wrapper. Doesn’t do any type checking; highly unsafe to use! Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.