[−][src]Struct ugli_webgl::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]
pub const COMPRESSED_R11_EAC: GLenum
[src]
pub const COMPRESSED_RG11_EAC: GLenum
[src]
pub const COMPRESSED_RGB8_ETC2: GLenum
[src]
pub const COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum
[src]
pub const COMPRESSED_RGBA8_ETC2_EAC: GLenum
[src]
pub const COMPRESSED_SIGNED_R11_EAC: GLenum
[src]
pub const COMPRESSED_SIGNED_RG11_EAC: GLenum
[src]
pub const COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: GLenum
[src]
pub const COMPRESSED_SRGB8_ETC2: GLenum
[src]
pub const COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum
[src]
Trait Implementations
impl AsRef<Reference> for WEBGL_compressed_texture_etc
[src]
impl Clone for WEBGL_compressed_texture_etc
[src]
fn clone(&self) -> WEBGL_compressed_texture_etc
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn from(value: WEBGL_compressed_texture_etc) -> Self
[src]
impl InstanceOf for WEBGL_compressed_texture_etc
[src]
fn instance_of(_reference: &Reference) -> bool
[src]
impl JsSerialize for WEBGL_compressed_texture_etc
[src]
impl JsSerializeOwned for WEBGL_compressed_texture_etc
[src]
fn into_js_owned<'_a>(value: &'_a mut Option<Self>) -> SerializedValue<'_a>
[src]
impl<'_r> JsSerializeOwned for &'_r WEBGL_compressed_texture_etc
[src]
fn into_js_owned<'_a>(value: &'_a mut Option<Self>) -> SerializedValue<'_a>
[src]
impl ReferenceType for WEBGL_compressed_texture_etc
[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self
[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.
fn try_from(reference: &Reference) -> Result<Self, Self::Error>
[src]
impl<'_r> TryFrom<&'_r Value> for WEBGL_compressed_texture_etc
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error>
[src]
impl TryFrom<Reference> for WEBGL_compressed_texture_etc
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error>
[src]
impl TryFrom<Value> for WEBGL_compressed_texture_etc
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error>
[src]
impl TryFrom<WEBGL_compressed_texture_etc> for Reference
[src]
Auto Trait Implementations
impl RefUnwindSafe for WEBGL_compressed_texture_etc
impl Send for WEBGL_compressed_texture_etc
impl Sync for WEBGL_compressed_texture_etc
impl Unpin for WEBGL_compressed_texture_etc
impl UnwindSafe for WEBGL_compressed_texture_etc
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,