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 more