#[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 more