pub struct WEBGL_compressed_texture_s3tc_srgb(_);
Expand description
Extension
This extension exposes the sRGB compressed texture formats defined in the EXT_texture_sRGB OpenGL extension to WebGL. Compression formats COMPRESSED_SRGB_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, and COMPRESSED_SRGB_ALPHA_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_SRGB_S3TC_DXT1_EXT COMPRESSED_SRGB_ALPHA_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_SRGB_ALPHA_S3TC_DXT3_EXT COMPRESSED_SRGB_ALPHA_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.
Implementations
sourceimpl WEBGL_compressed_texture_s3tc_srgb
impl WEBGL_compressed_texture_s3tc_srgb
pub const COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: GLenum = 35_917u32
pub const COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: GLenum = 35_918u32
pub const COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: GLenum = 35_919u32
pub const COMPRESSED_SRGB_S3TC_DXT1_EXT: GLenum = 35_916u32
Trait Implementations
sourceimpl Clone for WEBGL_compressed_texture_s3tc_srgb
impl Clone for WEBGL_compressed_texture_s3tc_srgb
sourcefn clone(&self) -> WEBGL_compressed_texture_s3tc_srgb
fn clone(&self) -> WEBGL_compressed_texture_s3tc_srgb
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl From<WEBGL_compressed_texture_s3tc_srgb> for Reference
impl From<WEBGL_compressed_texture_s3tc_srgb> for Reference
sourcefn from(value: WEBGL_compressed_texture_s3tc_srgb) -> Self
fn from(value: WEBGL_compressed_texture_s3tc_srgb) -> Self
sourceimpl InstanceOf for WEBGL_compressed_texture_s3tc_srgb
impl InstanceOf for WEBGL_compressed_texture_s3tc_srgb
sourcefn instance_of(_reference: &Reference) -> bool
fn instance_of(_reference: &Reference) -> bool
Self
.