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.