Struct webgl_rs::texture::WebGLRSTexture
source · pub struct WebGLRSTexture<'ctx> { /* private fields */ }
Expand description
The WebGLTexture interface is part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations.
Implementations§
source§impl<'ctx> WebGLRSTexture<'ctx>
impl<'ctx> WebGLRSTexture<'ctx>
sourcepub fn bind(&self, target: TextureKind)
pub fn bind(&self, target: TextureKind)
sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns true if the WebGLRSTexture
is valid and false otherwise.
sourcepub fn attach_framebuffer(
&self,
target: FramebufferKind,
attachment: Attachment,
tex_target: TextureBindPoint,
level: i32
)
pub fn attach_framebuffer(
&self,
target: FramebufferKind,
attachment: Attachment,
tex_target: TextureBindPoint,
level: i32
)
Attaches this WebGLRSTexture
object to a framebuffer.
Arguments
target
- specifying the binding point.attachment
- specifying the attachment point for the texture.tex_target
- specifying the texture target.level
- specifying the mipmap level of the texture image to attach.
sourcepub fn attach_layer_framebuffer(
&self,
target: FramebufferKind,
attachment: Attachment,
level: i32,
layer: i32
)
pub fn attach_layer_framebuffer(
&self,
target: FramebufferKind,
attachment: Attachment,
level: i32,
layer: i32
)
Attaches a single layer of this WebGLRSTexture
object to a framebuffer.TextureBindPoint
Arguments
target
- specifying the binding point.attachment
- specifying the attachment point for the texture.level
- specifying the mipmap level of the texture image to attach.layer
- specifying the layer of the texture image to attach.
Trait Implementations§
source§impl<'ctx> Clone for WebGLRSTexture<'ctx>
impl<'ctx> Clone for WebGLRSTexture<'ctx>
source§fn clone(&self) -> WebGLRSTexture<'ctx>
fn clone(&self) -> WebGLRSTexture<'ctx>
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 more