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

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

Fields

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

Implementations

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

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

pub fn get_buffer<T: RenderResource>(
    &self,
    render_resource: &T,
    buffer_usage: BufferUsage
) -> 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_bind_groups_from_bindings(
    &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

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

type Fetch = FetchDrawContext

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

Auto Trait Implementations

impl<'a> !RefUnwindSafe for DrawContext<'a>

impl<'a> Send for DrawContext<'a>

impl<'a> Sync for DrawContext<'a>

impl<'a> Unpin for DrawContext<'a>

impl<'a> !UnwindSafe for DrawContext<'a>

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> Component for T where
    T: 'static + Send + Sync

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

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

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

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

impl<T> Resource for T where
    T: 'static + Send + Sync
[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>,