pub struct Texture3D {
pub texture: Texture,
/* private fields */
}Expand description
A Texture3D representation.
Fields§
§texture: TextureBase texture object.
Implementations§
Source§impl Texture3D
impl Texture3D
Sourcepub fn dimensions(&self) -> (usize, usize, usize)
pub fn dimensions(&self) -> (usize, usize, usize)
Gets the dimensions.
Sourcepub fn allocate(
context: &Context,
dimensions: (usize, usize, usize),
format: &TextureFormat,
) -> Self
pub fn allocate( context: &Context, dimensions: (usize, usize, usize), format: &TextureFormat, ) -> Self
Allocates a new Texture3D with the specified dimensions and TextureFormat.
Sourcepub fn from_data<T>(
context: &Context,
dimensions: (usize, usize, usize),
format: &TextureFormat,
data: &[T],
data_format: &TextureFormat,
) -> Self
pub fn from_data<T>( context: &Context, dimensions: (usize, usize, usize), format: &TextureFormat, data: &[T], data_format: &TextureFormat, ) -> Self
Creates a new Texture3D from a slice.
Sourcepub fn reallocate(
&mut self,
dimensions: (usize, usize, usize),
format: &TextureFormat,
)
pub fn reallocate( &mut self, dimensions: (usize, usize, usize), format: &TextureFormat, )
Reallocates the memory on the GPU side.
Sourcepub fn set_data<T>(
&mut self,
dimensions: (usize, usize, usize),
format: &TextureFormat,
data: &[T],
data_format: &TextureFormat,
)
pub fn set_data<T>( &mut self, dimensions: (usize, usize, usize), format: &TextureFormat, data: &[T], data_format: &TextureFormat, )
Sets the data on the GPU side.
Trait Implementations§
Source§impl BorrowMut<Texture> for Texture3D
impl BorrowMut<Texture> for Texture3D
Source§fn borrow_mut(&mut self) -> &mut Texture
fn borrow_mut(&mut self) -> &mut Texture
Mutably borrows from an owned value. Read more
Auto Trait Implementations§
impl Freeze for Texture3D
impl RefUnwindSafe for Texture3D
impl !Send for Texture3D
impl !Sync for Texture3D
impl Unpin for Texture3D
impl UnwindSafe for Texture3D
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