[][src]Struct bevy_render::draw::DrawContext

pub struct DrawContext<'a> {
    pub pipelines: ResMut<'a, Assets<PipelineDescriptor>>,
    pub shaders: ResMut<'a, Assets<Shader>>,
    pub asset_render_resource_bindings: ResMut<'a, AssetRenderResourceBindings>,
    pub pipeline_compiler: ResMut<'a, PipelineCompiler>,
    pub render_resource_context: Res<'a, Box<dyn RenderResourceContext>>,
    pub shared_buffers: ResMut<'a, SharedBuffers>,
    pub current_pipeline: Option<Handle<PipelineDescriptor>>,
}

Fields

pipelines: ResMut<'a, Assets<PipelineDescriptor>>shaders: ResMut<'a, Assets<Shader>>asset_render_resource_bindings: ResMut<'a, AssetRenderResourceBindings>pipeline_compiler: ResMut<'a, PipelineCompiler>render_resource_context: Res<'a, Box<dyn RenderResourceContext>>shared_buffers: ResMut<'a, SharedBuffers>current_pipeline: Option<Handle<PipelineDescriptor>>

Implementations

impl<'a> DrawContext<'a>[src]

pub fn get_uniform_buffer<T: RenderResource>(
    &mut self,
    render_resource: &T
) -> Result<RenderResourceBinding, DrawError>
[src]

pub fn set_pipeline(
    &mut self,
    draw: &mut Draw,
    pipeline_handle: &Handle<PipelineDescriptor>,
    specialization: &PipelineSpecialization
) -> Result<(), DrawError>
[src]

pub fn get_pipeline_descriptor(&self) -> Result<&PipelineDescriptor, DrawError>[src]

pub fn get_pipeline_layout(&self) -> Result<&PipelineLayout, DrawError>[src]

pub fn set_asset_bind_groups<T: Asset>(
    &mut self,
    draw: &mut Draw,
    asset_handle: &Handle<T>
) -> Result<(), DrawError>
[src]

pub fn set_bind_groups_from_bindings(
    &mut self,
    draw: &mut Draw,
    render_resource_bindings: &mut [&mut RenderResourceBindings]
) -> Result<(), DrawError>
[src]

pub fn create_bind_group_resource(
    &self,
    index: u32,
    bind_group: &BindGroup
) -> Result<(), DrawError>
[src]

pub fn set_vertex_buffers_from_bindings(
    &self,
    draw: &mut Draw,
    render_resource_bindings: &[&RenderResourceBindings]
) -> Result<(), DrawError>
[src]

Trait Implementations

Auto Trait Implementations

impl<'a> !RefUnwindSafe for DrawContext<'a>[src]

impl<'a> !Send for DrawContext<'a>[src]

impl<'a> !Sync for DrawContext<'a>[src]

impl<'a> Unpin for DrawContext<'a>[src]

impl<'a> !UnwindSafe for DrawContext<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,