#[repr(u8)]pub enum ImageBufferKind {
Texture2D = 0,
TextureRect = 1,
TextureExternal = 2,
}
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
Trait Implementations§
Source§impl Clone for ImageBufferKind
impl Clone for ImageBufferKind
Source§fn clone(&self) -> ImageBufferKind
fn clone(&self) -> ImageBufferKind
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ImageBufferKind
impl Hash for ImageBufferKind
Source§impl PartialEq for ImageBufferKind
impl PartialEq for ImageBufferKind
Source§impl Serialize for ImageBufferKind
impl Serialize for ImageBufferKind
impl Copy for ImageBufferKind
impl Eq for ImageBufferKind
impl StructuralPartialEq for ImageBufferKind
Auto Trait Implementations§
impl Freeze for ImageBufferKind
impl RefUnwindSafe for ImageBufferKind
impl Send for ImageBufferKind
impl Sync for ImageBufferKind
impl Unpin for ImageBufferKind
impl UnwindSafe for ImageBufferKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more