Struct piston_window::TextureContext
[−]pub struct TextureContext<F, R, C> where
F: Factory<R>,
R: Resources,
C: Buffer<R>, {
pub factory: F,
pub encoder: Encoder<R, C>,
}
Expand description
Context required to create and update textures.
Fields
factory: F
A factory to create textures.
encoder: Encoder<R, C>
An encoder to update textures.
Trait Implementations
impl<F, R, C> CreateTexture<TextureContext<F, R, C>> for Texture<R> where
F: Factory<R>,
R: Resources,
C: Buffer<R>,
impl<F, R, C> CreateTexture<TextureContext<F, R, C>> for Texture<R> where
F: Factory<R>,
R: Resources,
C: Buffer<R>,
fn create<S>(
context: &mut TextureContext<F, R, C>,
_format: Format,
memory: &[u8],
size: S,
settings: &TextureSettings
) -> Result<Texture<R>, <Texture<R> as TextureOp<TextureContext<F, R, C>>>::Error> where
S: Into<[u32; 2]>,
fn create<S>(
context: &mut TextureContext<F, R, C>,
_format: Format,
memory: &[u8],
size: S,
settings: &TextureSettings
) -> Result<Texture<R>, <Texture<R> as TextureOp<TextureContext<F, R, C>>>::Error> where
S: Into<[u32; 2]>,
Create texture from memory.
impl<F, R, C> UpdateTexture<TextureContext<F, R, C>> for Texture<R> where
F: Factory<R>,
R: Resources,
C: Buffer<R>,
impl<F, R, C> UpdateTexture<TextureContext<F, R, C>> for Texture<R> where
F: Factory<R>,
R: Resources,
C: Buffer<R>,
Auto Trait Implementations
impl<F, R, C> !RefUnwindSafe for TextureContext<F, R, C>
impl<F, R, C> Send for TextureContext<F, R, C> where
F: Send,
impl<F, R, C> Sync for TextureContext<F, R, C> where
C: Sync,
F: Sync,
impl<F, R, C> Unpin for TextureContext<F, R, C> where
C: Unpin,
F: Unpin,
<R as Resources>::Buffer: Unpin,
<R as Resources>::DepthStencilView: Unpin,
<R as Resources>::RenderTargetView: Unpin,
<R as Resources>::Sampler: Unpin,
<R as Resources>::ShaderResourceView: Unpin,
<R as Resources>::UnorderedAccessView: Unpin,
impl<F, R, C> !UnwindSafe for TextureContext<F, R, C>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more