pub enum TextureTarget {
Default = 0,
Array = 1,
Rect = 2,
External = 3,
}
Expand description
Specifies the type of texture target in driver terms.
Variants§
Default = 0
Standard texture. This maps to GL_TEXTURE_2D in OpenGL.
Array = 1
Array texture. This maps to GL_TEXTURE_2D_ARRAY in OpenGL. See https://www.khronos.org/opengl/wiki/Array_Texture for background on Array textures.
Rect = 2
Rectange 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.
External = 3
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 TextureTarget
impl Clone for TextureTarget
Source§fn clone(&self) -> TextureTarget
fn clone(&self) -> TextureTarget
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TextureTarget
impl Debug for TextureTarget
Source§impl Hash for TextureTarget
impl Hash for TextureTarget
Source§impl Ord for TextureTarget
impl Ord for TextureTarget
Source§fn cmp(&self, other: &TextureTarget) -> Ordering
fn cmp(&self, other: &TextureTarget) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TextureTarget
impl PartialEq for TextureTarget
Source§impl PartialOrd for TextureTarget
impl PartialOrd for TextureTarget
impl Copy for TextureTarget
impl Eq for TextureTarget
impl StructuralPartialEq for TextureTarget
Auto Trait Implementations§
impl Freeze for TextureTarget
impl RefUnwindSafe for TextureTarget
impl Send for TextureTarget
impl Sync for TextureTarget
impl Unpin for TextureTarget
impl UnwindSafe for TextureTarget
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)