[−][src]Struct ugli_webgl::WEBGL_compressed_texture_s3tc
Extension
This extension exposes the compressed texture formats defined in the EXT_texture_compression_s3tc OpenGL extension to WebGL. Compression formats COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT3_EXT, and COMPRESSED_RGBA_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_RGB_S3TC_DXT1_EXT COMPRESSED_RGBA_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_RGBA_S3TC_DXT3_EXT COMPRESSED_RGBA_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
[src]
pub const COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum
[src]
pub const COMPRESSED_RGBA_S3TC_DXT3_EXT: GLenum
[src]
pub const COMPRESSED_RGBA_S3TC_DXT5_EXT: GLenum
[src]
pub const COMPRESSED_RGB_S3TC_DXT1_EXT: GLenum
[src]
Trait Implementations
impl AsRef<Reference> for WEBGL_compressed_texture_s3tc
[src]
impl Clone for WEBGL_compressed_texture_s3tc
[src]
fn clone(&self) -> WEBGL_compressed_texture_s3tc
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for WEBGL_compressed_texture_s3tc
[src]
impl Extension for WEBGL_compressed_texture_s3tc
[src]
impl From<WEBGL_compressed_texture_s3tc> for Reference
[src]
fn from(value: WEBGL_compressed_texture_s3tc) -> Self
[src]
impl InstanceOf for WEBGL_compressed_texture_s3tc
[src]
fn instance_of(_reference: &Reference) -> bool
[src]
impl JsSerialize for WEBGL_compressed_texture_s3tc
[src]
impl JsSerializeOwned for WEBGL_compressed_texture_s3tc
[src]
fn into_js_owned<'_a>(value: &'_a mut Option<Self>) -> SerializedValue<'_a>
[src]
impl<'_r> JsSerializeOwned for &'_r WEBGL_compressed_texture_s3tc
[src]
fn into_js_owned<'_a>(value: &'_a mut Option<Self>) -> SerializedValue<'_a>
[src]
impl ReferenceType for WEBGL_compressed_texture_s3tc
[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self
[src]
impl<'_r> TryFrom<&'_r Reference> for WEBGL_compressed_texture_s3tc
[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_s3tc
[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_s3tc
[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_s3tc
[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_s3tc> for Reference
[src]
Auto Trait Implementations
impl RefUnwindSafe for WEBGL_compressed_texture_s3tc
impl Send for WEBGL_compressed_texture_s3tc
impl Sync for WEBGL_compressed_texture_s3tc
impl Unpin for WEBGL_compressed_texture_s3tc
impl UnwindSafe for WEBGL_compressed_texture_s3tc
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>,