Struct three_d::core::texture::Texture2D [−][src]
pub struct Texture2D { /* fields omitted */ }Expand description
A 2D texture, basically an image that is transferred to the GPU. For a texture that can be rendered into, see ColorTargetTexture2D.
Implementations
pub fn new<T: TextureDataType>(
context: &Context,
cpu_texture: &CPUTexture<T>
) -> ThreeDResult<Texture2D>
pub fn new<T: TextureDataType>(
context: &Context,
cpu_texture: &CPUTexture<T>
) -> ThreeDResult<Texture2D>
Construcs a new texture with the given data.
Fills this texture with the given data.
Errors
Return an error if the length of the data array is smaller or bigger than the necessary number of bytes to fill the entire texture.
Trait Implementations
Whether this texture contain pixels with alpha value less than maximum.
Auto Trait Implementations
impl !RefUnwindSafe for Texture2D
impl !UnwindSafe for Texture2D
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more