pub struct WEBGL_compressed_texture_pvrtc(_);
Expand description
Extension
This extension exposes the compressed texture formats defined in the IMG_texture_compression_pvrtc OpenGL extension to WebGL. Compression formats COMPRESSED_RGB_PVRTC_4BPPV1_IMG, COMPRESSED_RGB_PVRTC_2BPPV1_IMG, COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, and COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 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 apply to all of the formats described by this extension:
In compressedTexImage2D, the width and height parameters must be powers of two. Otherwise, an INVALID_VALUE error is generated.
In compressedTexSubImage2D, the width and height parameters must be equal to the current values of the existing texture image, and the xoffset and yoffset parameters must be zero. Otherwise, an INVALID_VALUE error is generated.
The following format-specific restrictions must also be enforced: COMPRESSED_RGB_PVRTC_4BPPV1_IMG COMPRESSED_RGBA_PVRTC_4BPPV1_IMG
The byteLength of the ArrayBufferView, pixels, passed to either compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
max(width, 8) * max(height, 8) / 2
If it is not, an INVALID_VALUE error is generated. COMPRESSED_RGB_PVRTC_2BPPV1_IMG COMPRESSED_RGBA_PVRTC_2BPPV1_IMG
The byteLength of the ArrayBufferView, pixels, passed to either compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:
max(width, 16) * max(height, 8) / 4
If it is not, an INVALID_VALUE error is generated.
Implementations
sourceimpl WEBGL_compressed_texture_pvrtc
impl WEBGL_compressed_texture_pvrtc
pub const COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: GLenum = 35_843u32
pub const COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: GLenum = 35_842u32
pub const COMPRESSED_RGB_PVRTC_2BPPV1_IMG: GLenum = 35_841u32
pub const COMPRESSED_RGB_PVRTC_4BPPV1_IMG: GLenum = 35_840u32
Trait Implementations
sourceimpl Clone for WEBGL_compressed_texture_pvrtc
impl Clone for WEBGL_compressed_texture_pvrtc
sourcefn clone(&self) -> WEBGL_compressed_texture_pvrtc
fn clone(&self) -> WEBGL_compressed_texture_pvrtc
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl From<WEBGL_compressed_texture_pvrtc> for Reference
impl From<WEBGL_compressed_texture_pvrtc> for Reference
sourcefn from(value: WEBGL_compressed_texture_pvrtc) -> Self
fn from(value: WEBGL_compressed_texture_pvrtc) -> Self
sourceimpl InstanceOf for WEBGL_compressed_texture_pvrtc
impl InstanceOf for WEBGL_compressed_texture_pvrtc
sourcefn instance_of(_reference: &Reference) -> bool
fn instance_of(_reference: &Reference) -> bool
Self
.