[][src]Struct ugli_webgl::WEBGL_compressed_texture_pvrtc

pub struct WEBGL_compressed_texture_pvrtc(_);

Extension

This extension exposes the compressed texture formats defined in the IMG_texture_compression_pvrtc OpenGL extension to WebGL. Compression formats COMPRESSED_RGB_PVRTC_4BPPV1_IMG, COMPRESSED_RGB_PVRTC_2BPPV1_IMG, COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, and COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 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 apply to all of the formats described by this extension:

In compressedTexImage2D, the width and height parameters must be powers of two. Otherwise, an INVALID_VALUE error is generated.

In compressedTexSubImage2D, the width and height parameters must be equal to the current values of the existing texture image, and the xoffset and yoffset parameters must be zero. Otherwise, an INVALID_VALUE error is generated.

The following format-specific restrictions must also be enforced: COMPRESSED_RGB_PVRTC_4BPPV1_IMG COMPRESSED_RGBA_PVRTC_4BPPV1_IMG

The byteLength of the ArrayBufferView, pixels, passed to either compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:

max(width, 8) * max(height, 8) / 2

If it is not, an INVALID_VALUE error is generated. COMPRESSED_RGB_PVRTC_2BPPV1_IMG COMPRESSED_RGBA_PVRTC_2BPPV1_IMG

The byteLength of the ArrayBufferView, pixels, passed to either compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:

max(width, 16) * max(height, 8) / 4

If it is not, an INVALID_VALUE error is generated.

Methods

impl WEBGL_compressed_texture_pvrtc[src]

Trait Implementations

impl AsRef<Reference> for WEBGL_compressed_texture_pvrtc[src]

impl Clone for WEBGL_compressed_texture_pvrtc[src]

impl Debug for WEBGL_compressed_texture_pvrtc[src]

impl Extension for WEBGL_compressed_texture_pvrtc[src]

impl From<WEBGL_compressed_texture_pvrtc> for Reference[src]

impl InstanceOf for WEBGL_compressed_texture_pvrtc[src]

impl JsSerialize for WEBGL_compressed_texture_pvrtc[src]

impl JsSerializeOwned for WEBGL_compressed_texture_pvrtc[src]

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

impl ReferenceType for WEBGL_compressed_texture_pvrtc[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Reference> for WEBGL_compressed_texture_pvrtc[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for WEBGL_compressed_texture_pvrtc[src]

type Error = ConversionError

The type returned in the event of a conversion error.

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