Struct webgl_stdweb::WEBGL_compressed_texture_atc
[−]
[src]
pub struct WEBGL_compressed_texture_atc(_);
Extension
This extension exposes the compressed texture formats defined in the AMD_compressed_ATC_texture OpenGL extension to WebGL. Compression formats COMPRESSED_RGB_ATC_WEBGL, COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL, and COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL may be passed to the compressedTexImage2D and compressedTexSubImage2D entry points. These formats correspond to the 3 formats defined in the AMD_compressed_ATC_texture OpenGL extension. Although the enum names are changed, their numeric values are the same. The correspondence is given by this table: WebGL format enum OpenGL format enum Numeric value COMPRESSED_RGB_ATC_WEBGL ATC_RGB_AMD 0x8C92 COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE Calling getParameter with the argument COMPRESSED_TEXTURE_FORMATS will include the 3 formats from this specification.
The following format-specific restrictions must be enforced: COMPRESSED_RGB_ATC_WEBGL
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D, must be equal to the following number of bytes:
floor((width + 3) / 4) * floor((height + 3) / 4) * 8
If it is not, an INVALID_VALUE error is generated. COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D, must be equal to the following number of bytes:
floor((width + 3) / 4) * floor((height + 3) / 4) * 16
If it is not, an INVALID_VALUE error is generated.
Methods
impl WEBGL_compressed_texture_atc
[src]
pub const COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL: GLenum
COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL: GLenum = 35987
pub const COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL: GLenum
COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL: GLenum = 34798
pub const COMPRESSED_RGB_ATC_WEBGL: GLenum
COMPRESSED_RGB_ATC_WEBGL: GLenum = 35986
Trait Implementations
impl Debug for WEBGL_compressed_texture_atc
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for WEBGL_compressed_texture_atc
[src]
fn clone(&self) -> WEBGL_compressed_texture_atc
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl AsRef<Reference> for WEBGL_compressed_texture_atc
[src]
impl ReferenceType for WEBGL_compressed_texture_atc
[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self
[src]
Converts a given reference into a concrete reference-like wrapper. Doesn't do any type checking; highly unsafe to use! Read more
impl From<WEBGL_compressed_texture_atc> for Reference
[src]
fn from(value: WEBGL_compressed_texture_atc) -> Self
[src]
Performs the conversion.
impl TryFrom<WEBGL_compressed_texture_atc> for Reference
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: WEBGL_compressed_texture_atc) -> Result<Self, Self::Error>
[src]
Performs the conversion.
impl TryFrom<Reference> for WEBGL_compressed_texture_atc
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error>
[src]
Performs the conversion.
impl<'_r> TryFrom<&'_r Reference> for WEBGL_compressed_texture_atc
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error>
[src]
Performs the conversion.
impl TryFrom<Value> for WEBGL_compressed_texture_atc
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error>
[src]
Performs the conversion.
impl<'_r> TryFrom<&'_r Value> for WEBGL_compressed_texture_atc
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error>
[src]
Performs the conversion.
impl JsSerialize for WEBGL_compressed_texture_atc
[src]
impl JsSerializeOwned for WEBGL_compressed_texture_atc
[src]
fn into_js_owned<'_a>(
value: &'_a mut Option<Self>,
arena: &'_a PreallocatedArena
) -> SerializedValue<'_a>
[src]
value: &'_a mut Option<Self>,
arena: &'_a PreallocatedArena
) -> SerializedValue<'_a>
fn memory_required_owned(&self) -> usize
[src]
impl<'_r> JsSerializeOwned for &'_r WEBGL_compressed_texture_atc
[src]
fn into_js_owned<'_a>(
value: &'_a mut Option<Self>,
arena: &'_a PreallocatedArena
) -> SerializedValue<'_a>
[src]
value: &'_a mut Option<Self>,
arena: &'_a PreallocatedArena
) -> SerializedValue<'_a>
fn memory_required_owned(&self) -> usize
[src]
impl InstanceOf for WEBGL_compressed_texture_atc
[src]
fn instance_of(reference: &Reference) -> bool
[src]
Checks whenever a given Reference if of type Self
.