[][src]Struct ugli_webgl::WEBGL_compressed_texture_etc

pub struct WEBGL_compressed_texture_etc(_);

Extension

This extension exposes the compressed texture formats defined as core in the OpenGL ES 3.0 spec to WebGL. These include the ETC2 and EAC formats, where ETC2 is a superset of ETC1. ETC1 textures can be loaded using the ETC2 token value. All of these formats are in the ETC family.

Browsers should not advertise this extension when the WebGL implementation, or graphics driver, supports these formats by decompressing them. Compression formats COMPRESSED_R11_EAC, COMPRESSED_SIGNED_R11_EAC, COMPRESSED_RG11_EAC, COMPRESSED_SIGNED_RG11_EAC, COMPRESSED_RGB8_ETC2, COMPRESSED_SRGB8_ETC2, COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, COMPRESSED_RGBA8_ETC2_EAC, and COMPRESSED_SRGB8_ALPHA8_ETC2_EAC may be passed to the compressedTexImage2D and compressedTexSubImage2D entry points. In WebGL 2.0, they may also be passed to the compressedTexImage3D and compressedTexSubImage3D entry points with the TEXTURE_2D_ARRAY target. Calling getParameter with the argument COMPRESSED_TEXTURE_FORMATS will include the formats from this specification. For all of the formats, validatedSize (defined for each specific format below) is validated in the following ways:

  • WebGL 1.0 and 2.0: if the variant of compressedTexImageD or compressedTexSubImageD taking ArrayBufferView pixels is called, then the byteLength of the view must be equal to validatedSize, or an INVALID_VALUE error is generated.
  • WebGL 2.0: if the variant of compressedTexImageD or compressedTexSubImageD taking GLintptr offset is called, and offset + validatedSize is greater than the size of the bound PIXEL_UNPACK_BUFFER, an INVALID_OPERATION error is generated.

COMPRESSED_R11_EAC COMPRESSED_SIGNED_R11_EAC COMPRESSED_RGB8_ETC2 COMPRESSED_SRGB8_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2

validatedSize is computed in the following way:

floor((width + 3) / 4) * floor((height + 3) / 4) * 8 COMPRESSED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC

validatedSize is computed in the following way:

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

Methods

impl WEBGL_compressed_texture_etc[src]

Trait Implementations

impl AsRef<Reference> for WEBGL_compressed_texture_etc[src]

impl Clone for WEBGL_compressed_texture_etc[src]

impl Debug for WEBGL_compressed_texture_etc[src]

impl Extension for WEBGL_compressed_texture_etc[src]

impl From<WEBGL_compressed_texture_etc> for Reference[src]

impl InstanceOf for WEBGL_compressed_texture_etc[src]

impl JsSerialize for WEBGL_compressed_texture_etc[src]

impl JsSerializeOwned for WEBGL_compressed_texture_etc[src]

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

impl ReferenceType for WEBGL_compressed_texture_etc[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Reference> for WEBGL_compressed_texture_etc[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for WEBGL_compressed_texture_etc[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<WEBGL_compressed_texture_etc> 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.