Struct webgl_stdweb::WEBGL_compressed_texture_astc
[−]
[src]
pub struct WEBGL_compressed_texture_astc(_);
Extension
This extension exposes the compressed texture format defined in the KHR_texture_compression_astc_hdr OpenGL ES extension to WebGL. Consult that extension specification for behavioral definitions, including error behaviors.
ASTC textures may be encoded using either high or low dynamic range, corresponding to an "HDR profile" and "LDR profile". The compression format is designed to be extended, and for new profiles to be added in the future. For this reason, enabling the WebGL extension enables all of the profiles supported by the implementation. The supported profiles may be queried by calling getSupportedProfiles against the extension object. Compression format COMPRESSED_RGBA_ASTC_4x4_KHR, COMPRESSED_RGBA_ASTC_5x4_KHR, COMPRESSED_RGBA_ASTC_5x5_KHR, COMPRESSED_RGBA_ASTC_6x5_KHR, COMPRESSED_RGBA_ASTC_6x6_KHR, COMPRESSED_RGBA_ASTC_8x5_KHR, COMPRESSED_RGBA_ASTC_8x6_KHR, COMPRESSED_RGBA_ASTC_8x8_KHR, COMPRESSED_RGBA_ASTC_10x5_KHR, COMPRESSED_RGBA_ASTC_10x6_KHR, COMPRESSED_RGBA_ASTC_10x8_KHR, COMPRESSED_RGBA_ASTC_10x10_KHR, COMPRESSED_RGBA_ASTC_12x10_KHR, COMPRESSED_RGBA_ASTC_12x12_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, and COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR may be passed to the compressedTexImage2D and compressedTexSubImage2D entry points. Calling getParameter with the argument COMPRESSED_TEXTURE_FORMATS will include the format from this specification.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_4x4_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D 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.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_5x4_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 4) / 5) * floor((height + 3) / 4) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_5x5_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 4) / 5) * floor((height + 4) / 5) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_6x5_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 5) / 6) * floor((height + 4) / 5) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_6x6_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 5) / 6) * floor((height + 5) / 6) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_8x5_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 7) / 8) * floor((height + 4) / 5) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_8x6_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 7) / 8) * floor((height + 5) / 6) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_8x8_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 7) / 8) * floor((height + 7) / 8) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_10x5_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 9) / 10) * floor((height + 4) / 5) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_10x6_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 9) / 10) * floor((height + 5) / 6) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_10x8_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 9) / 10) * floor((height + 7) / 8) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_10x10_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 9) / 10) * floor((height + 9) / 10) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_12x10_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 11) / 12) * floor((height + 9) / 10) * 16
If it is not, an INVALID_VALUE error is generated.
The following format-specific restrictions must be enforced: COMPRESSED_RGBA_ASTC_12x12_KHR COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR
The byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
floor((width + 11) / 12) * floor((height + 11) / 12) * 16
If it is not, an INVALID_VALUE error is generated.
Methods
impl WEBGL_compressed_texture_astc
[src]
pub const COMPRESSED_RGBA_ASTC_10X10_KHR: GLenum
COMPRESSED_RGBA_ASTC_10X10_KHR: GLenum = 37819
pub const COMPRESSED_RGBA_ASTC_10X5_KHR: GLenum
COMPRESSED_RGBA_ASTC_10X5_KHR: GLenum = 37816
pub const COMPRESSED_RGBA_ASTC_10X6_KHR: GLenum
COMPRESSED_RGBA_ASTC_10X6_KHR: GLenum = 37817
pub const COMPRESSED_RGBA_ASTC_10X8_KHR: GLenum
COMPRESSED_RGBA_ASTC_10X8_KHR: GLenum = 37818
pub const COMPRESSED_RGBA_ASTC_12X10_KHR: GLenum
COMPRESSED_RGBA_ASTC_12X10_KHR: GLenum = 37820
pub const COMPRESSED_RGBA_ASTC_12X12_KHR: GLenum
COMPRESSED_RGBA_ASTC_12X12_KHR: GLenum = 37821
pub const COMPRESSED_RGBA_ASTC_4X4_KHR: GLenum
COMPRESSED_RGBA_ASTC_4X4_KHR: GLenum = 37808
pub const COMPRESSED_RGBA_ASTC_5X4_KHR: GLenum
COMPRESSED_RGBA_ASTC_5X4_KHR: GLenum = 37809
pub const COMPRESSED_RGBA_ASTC_5X5_KHR: GLenum
COMPRESSED_RGBA_ASTC_5X5_KHR: GLenum = 37810
pub const COMPRESSED_RGBA_ASTC_6X5_KHR: GLenum
COMPRESSED_RGBA_ASTC_6X5_KHR: GLenum = 37811
pub const COMPRESSED_RGBA_ASTC_6X6_KHR: GLenum
COMPRESSED_RGBA_ASTC_6X6_KHR: GLenum = 37812
pub const COMPRESSED_RGBA_ASTC_8X5_KHR: GLenum
COMPRESSED_RGBA_ASTC_8X5_KHR: GLenum = 37813
pub const COMPRESSED_RGBA_ASTC_8X6_KHR: GLenum
COMPRESSED_RGBA_ASTC_8X6_KHR: GLenum = 37814
pub const COMPRESSED_RGBA_ASTC_8X8_KHR: GLenum
COMPRESSED_RGBA_ASTC_8X8_KHR: GLenum = 37815
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR: GLenum = 37851
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR: GLenum = 37848
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR: GLenum = 37849
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR: GLenum = 37850
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR: GLenum = 37852
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR: GLenum = 37853
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR: GLenum = 37840
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR: GLenum = 37841
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR: GLenum = 37842
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR: GLenum = 37843
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR: GLenum = 37844
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR: GLenum = 37845
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR: GLenum = 37846
pub const COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR: GLenum
COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR: GLenum = 37847
pub fn get_supported_profiles(&self) -> Vec<String>
[src]
Returns the names of the ASTC profiles supported by the implementation. As of this writing, valid return values will include "ldr", corresponding to the GL_KHR_texture_compression_astc_ldr extension string; and "hdr", corresponding to the GL_KHR_texture_compression_astc_hdr extension string. More profiles may be added in the future.
Trait Implementations
impl Debug for WEBGL_compressed_texture_astc
[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_astc
[src]
fn clone(&self) -> WEBGL_compressed_texture_astc
[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_astc
[src]
impl ReferenceType for WEBGL_compressed_texture_astc
[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_astc> for Reference
[src]
fn from(value: WEBGL_compressed_texture_astc) -> Self
[src]
Performs the conversion.
impl TryFrom<WEBGL_compressed_texture_astc> for Reference
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: WEBGL_compressed_texture_astc) -> Result<Self, Self::Error>
[src]
Performs the conversion.
impl TryFrom<Reference> for WEBGL_compressed_texture_astc
[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_astc
[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_astc
[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_astc
[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_astc
[src]
impl JsSerializeOwned for WEBGL_compressed_texture_astc
[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_astc
[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_astc
[src]
fn instance_of(reference: &Reference) -> bool
[src]
Checks whenever a given Reference if of type Self
.