pub enum SurfaceTexture<Def, Alt>where
Def: DeviceInterface,
Alt: DeviceInterface,{
Default(Def::SurfaceTexture),
Alternate(Alt::SurfaceTexture),
}
Expand description
Represents an OpenGL texture that wraps a surface.
Reading from the associated OpenGL texture reads from the surface. It is undefined behavior to write to such a texture (e.g. by binding it to a framebuffer and rendering to that framebuffer).
Surface textures are local to a context, but that context does not have to be the same context
as that associated with the underlying surface. The texture must be destroyed with the
destroy_surface_texture()
method, or a panic will occur.
Variants§
Default(Def::SurfaceTexture)
The default surface texture type.
Alternate(Alt::SurfaceTexture)
The alternate surface texture type.
Trait Implementations§
source§impl<Def, Alt> Debug for SurfaceTexture<Def, Alt>where
Def: DeviceInterface,
Alt: DeviceInterface,
impl<Def, Alt> Debug for SurfaceTexture<Def, Alt>where
Def: DeviceInterface,
Alt: DeviceInterface,
Auto Trait Implementations§
impl<Def, Alt> Freeze for SurfaceTexture<Def, Alt>
impl<Def, Alt> RefUnwindSafe for SurfaceTexture<Def, Alt>where
<Def as Device>::SurfaceTexture: RefUnwindSafe,
<Alt as Device>::SurfaceTexture: RefUnwindSafe,
impl<Def, Alt> Send for SurfaceTexture<Def, Alt>
impl<Def, Alt> Sync for SurfaceTexture<Def, Alt>
impl<Def, Alt> Unpin for SurfaceTexture<Def, Alt>
impl<Def, Alt> UnwindSafe for SurfaceTexture<Def, Alt>
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