Enum webrender_api::image::ImageBufferKind
source · #[repr(u8)]pub enum ImageBufferKind {
Texture2D = 0,
TextureRect = 1,
TextureExternal = 2,
TextureExternalBT709 = 3,
}
Expand description
Specifies the type of texture target in driver terms.
Variants§
Texture2D = 0
Standard texture. This maps to GL_TEXTURE_2D in OpenGL.
TextureRect = 1
Rectangle texture. This maps to GL_TEXTURE_RECTANGLE in OpenGL. This is similar to a standard texture, with a few subtle differences (no mipmaps, non-power-of-two dimensions, different coordinate space) that make it useful for representing the kinds of textures we use in WebRender. See https://www.khronos.org/opengl/wiki/Rectangle_Texture for background on Rectangle textures.
TextureExternal = 2
External texture. This maps to GL_TEXTURE_EXTERNAL_OES in OpenGL, which is an extension. This is used for image formats that OpenGL doesn’t understand, particularly YUV. See https://www.khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external.txt
TextureExternalBT709 = 3
External texture which is forced to be converted from YUV to RGB using BT709 colorspace. This maps to GL_TEXTURE_EXTERNAL_OES in OpenGL, using the EXT_YUV_TARGET extension. https://registry.khronos.org/OpenGL/extensions/EXT/EXT_YUV_target.txt
Trait Implementations§
source§impl Clone for ImageBufferKind
impl Clone for ImageBufferKind
source§fn clone(&self) -> ImageBufferKind
fn clone(&self) -> ImageBufferKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ImageBufferKind
impl Debug for ImageBufferKind
source§impl<'de> Deserialize<'de> for ImageBufferKind
impl<'de> Deserialize<'de> for ImageBufferKind
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Hash for ImageBufferKind
impl Hash for ImageBufferKind
source§impl PartialEq for ImageBufferKind
impl PartialEq for ImageBufferKind
source§fn eq(&self, other: &ImageBufferKind) -> bool
fn eq(&self, other: &ImageBufferKind) -> bool
self
and other
values to be equal, and is used
by ==
.