Context

Struct Context 

Source
pub struct Context { /* private fields */ }

Implementations§

Source§

impl Context

Source§

impl Context

Source§

impl Context

Source§

impl Context

Source

pub fn create_buffer(&self, desc: BufferDesc<'_>) -> Buffer

Source

pub fn sync_buffer(&self, _buffer: Buffer)

Source

pub fn destroy_buffer(&self, buffer: Buffer)

Source

pub fn create_texture(&self, desc: TextureDesc<'_>) -> Texture

Source

pub fn destroy_texture(&self, texture: Texture)

Source

pub fn create_texture_view( &self, texture: Texture, desc: TextureViewDesc<'_>, ) -> TextureView

Source

pub fn destroy_texture_view(&self, view: TextureView)

Source

pub fn create_sampler(&self, desc: SamplerDesc<'_>) -> Sampler

Source

pub fn destroy_sampler(&self, sampler: Sampler)

Source

pub fn create_acceleration_structure( &self, desc: AccelerationStructureDesc<'_>, ) -> AccelerationStructure

Source

pub fn destroy_acceleration_structure( &self, acceleration_structure: AccelerationStructure, )

Source§

impl Context

Source

pub fn create_surface<I: HasWindowHandle + HasDisplayHandle>( &self, window: &I, ) -> Result<Surface, NotSupportedError>

Source

pub fn destroy_surface(&self, surface: &mut Surface)

Source

pub fn reconfigure_surface(&self, surface: &mut Surface, config: SurfaceConfig)

Source§

impl Context

Source

pub fn create_command_encoder( &self, desc: CommandEncoderDesc<'_>, ) -> CommandEncoder

Source

pub fn destroy_command_encoder(&self, command_encoder: &mut CommandEncoder)

Source

pub fn submit(&self, encoder: &mut CommandEncoder) -> SyncPoint

Source

pub fn wait_for(&self, sp: &SyncPoint, timeout_ms: u32) -> bool

Source§

impl Context

Source

pub fn try_create_shader( &self, desc: ShaderDesc<'_>, ) -> Result<Shader, &'static str>

Source

pub fn create_shader(&self, desc: ShaderDesc<'_>) -> Shader

Source§

impl Context

Trait Implementations§

Source§

impl CommandDevice for Context

Source§

impl Drop for Context

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl ResourceDevice for Context

Source§

impl ShaderDevice for Context

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.