[][src]Struct ugli_webgl::WEBGL_compressed_texture_s3tc_srgb

pub struct WEBGL_compressed_texture_s3tc_srgb(_);

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.

Methods

impl WEBGL_compressed_texture_s3tc_srgb[src]

Trait Implementations

impl AsRef<Reference> for WEBGL_compressed_texture_s3tc_srgb[src]

impl Clone for WEBGL_compressed_texture_s3tc_srgb[src]

impl Debug for WEBGL_compressed_texture_s3tc_srgb[src]

impl Extension for WEBGL_compressed_texture_s3tc_srgb[src]

impl From<WEBGL_compressed_texture_s3tc_srgb> for Reference[src]

impl InstanceOf for WEBGL_compressed_texture_s3tc_srgb[src]

impl JsSerialize for WEBGL_compressed_texture_s3tc_srgb[src]

impl JsSerializeOwned for WEBGL_compressed_texture_s3tc_srgb[src]

impl<'_r> JsSerializeOwned for &'_r WEBGL_compressed_texture_s3tc_srgb[src]

impl ReferenceType for WEBGL_compressed_texture_s3tc_srgb[src]

impl<'_r> TryFrom<&'_r Reference> for WEBGL_compressed_texture_s3tc_srgb[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Value> for WEBGL_compressed_texture_s3tc_srgb[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Reference> for WEBGL_compressed_texture_s3tc_srgb[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for WEBGL_compressed_texture_s3tc_srgb[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<WEBGL_compressed_texture_s3tc_srgb> for Reference[src]

type Error = Void

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.