Struct blade_graphics::Context
source · pub struct Context { /* private fields */ }Implementations§
source§impl Context
impl Context
pub unsafe fn init(desc: ContextDesc) -> Result<Self, NotSupportedError>
pub unsafe fn init_windowed<I: HasRawWindowHandle + HasRawDisplayHandle>( window: &I, desc: ContextDesc ) -> Result<Self, NotSupportedError>
pub fn capabilities(&self) -> Capabilities
source§impl Context
impl Context
pub fn resize(&self, config: SurfaceConfig) -> TextureFormat
pub fn acquire_frame(&self) -> Frame
source§impl Context
impl Context
pub fn create_compute_pipeline( &self, desc: ComputePipelineDesc<'_> ) -> ComputePipeline
pub fn create_render_pipeline( &self, desc: RenderPipelineDesc<'_> ) -> RenderPipeline
source§impl Context
impl Context
pub fn get_bottom_level_acceleration_structure_sizes( &self, meshes: &[AccelerationStructureMesh] ) -> AccelerationStructureSizes
pub fn get_top_level_acceleration_structure_sizes( &self, instance_count: u32 ) -> AccelerationStructureSizes
pub fn create_acceleration_structure_instance_buffer( &self, instances: &[AccelerationStructureInstance], bottom_level: &[AccelerationStructure] ) -> Buffer
source§impl Context
impl Context
pub fn create_buffer(&self, desc: BufferDesc<'_>) -> Buffer
pub fn sync_buffer(&self, _buffer: Buffer)
pub fn destroy_buffer(&self, buffer: Buffer)
pub fn create_texture(&self, desc: TextureDesc<'_>) -> Texture
pub fn destroy_texture(&self, texture: Texture)
pub fn create_texture_view(&self, desc: TextureViewDesc<'_>) -> TextureView
pub fn destroy_texture_view(&self, view: TextureView)
pub fn create_sampler(&self, desc: SamplerDesc<'_>) -> Sampler
pub fn destroy_sampler(&self, sampler: Sampler)
pub fn create_acceleration_structure( &self, desc: AccelerationStructureDesc<'_> ) -> AccelerationStructure
pub fn destroy_acceleration_structure( &self, acceleration_structure: AccelerationStructure )
source§impl Context
impl Context
pub fn create_command_encoder( &self, desc: CommandEncoderDesc<'_> ) -> CommandEncoder
pub fn destroy_command_encoder(&self, command_encoder: CommandEncoder)
pub fn submit(&self, encoder: &mut CommandEncoder) -> SyncPoint
pub fn wait_for(&self, sp: &SyncPoint, timeout_ms: u32) -> bool
source§impl Context
impl Context
pub fn try_create_shader( &self, desc: ShaderDesc<'_> ) -> Result<Shader, &'static str>
pub fn create_shader(&self, desc: ShaderDesc<'_>) -> Shader
Auto Trait Implementations§
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more