oa::Presenter

Engine-borrowing presentation session. Construction creates and owns the SDL3 Vulkan surface, then records whether the Engine’s retained graphics queue can present to that exact surface. Swapchain acquire/present is intentionally the next lifecycle phase rather than a fabricated method on this real surface session.

StRust public API

Declaration

pub struct Presenter<'window> { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn has_graphics(&self) -> bool
pub fn supports_swapchain(&self) -> bool
pub fn has_present(&self) -> bool
pub fn capabilities(&self) -> Result<PresentationCapabilities>
pub fn swapchain_extent(&self, window: &SdlWindow) -> Result<Option<[u32; 2]>>
pub fn can_create_swapchain(&self, window: &SdlWindow) -> Result<bool>
pub fn init_swapchain(&mut self, window: &SdlWindow) -> Result<bool>
pub fn wait_presentation_idle(&mut self) -> Result<()>
pub fn close_swapchain(&mut self) -> Result<()>
pub fn recreate_swapchain(&mut self, window: &SdlWindow) -> Result<bool>
pub fn notify_pixel_size_changed(&mut self, width: u32, height: u32)
pub fn needs_swapchain_recreate(&self) -> bool
pub fn has_swapchain(&self) -> bool
pub fn swapchain_image_count(&self) -> usize
pub fn frames_in_flight(&self) -> usize
pub fn present_empty_frame(&mut self) -> Result<bool>
pub fn present_clear_frame(&mut self, color: Color) -> Result<bool>
pub fn present_texture(&mut self, texture: &Texture) -> Result<bool>
pub fn present_compose( &mut self, compose_image: Image, compose_width: u32, compose_height: u32, descriptor_set: DescriptorSet, pipeline_layout: PipelineLayout, record: impl FnOnce(&Device, CommandBuffer) -> Result<()>, ) -> Result<bool>
pub fn swapchain_extent_px(&self) -> Option<[u32; 2]>
fn drop(&mut self)

Associated Functions

pub fn new(engine: &Engine, window: &'window SdlWindow) -> Result<Self>

Public Method Documentation

pub fn has_graphics( &self ) -> bool
No public source comment is attached to this declaration.
pub fn supports_swapchain( &self ) -> bool
No public source comment is attached to this declaration.
pub fn has_present( &self ) -> bool
No public source comment is attached to this declaration.
pub fn capabilities( &self ) -> Result<PresentationCapabilities>
No public source comment is attached to this declaration.
pub fn swapchain_extent( &self, window: &SdlWindow ) -> Result<Option<[u32; 2]>>
No public source comment is attached to this declaration.
pub fn can_create_swapchain( &self, window: &SdlWindow ) -> Result<bool>
No public source comment is attached to this declaration.
pub fn init_swapchain( &mut self, window: &SdlWindow ) -> Result<bool>
No public source comment is attached to this declaration.
pub fn wait_presentation_idle(&mut self) -> Result<()>
No public source comment is attached to this declaration.
pub fn close_swapchain(&mut self) -> Result<()>
No public source comment is attached to this declaration.
pub fn recreate_swapchain( &mut self, window: &SdlWindow ) -> Result<bool>
No public source comment is attached to this declaration.
pub fn notify_pixel_size_changed( &mut self, width: u32, height: u32 )
No public source comment is attached to this declaration.
pub fn needs_swapchain_recreate( &self ) -> bool
Create a presentation session for one SDL3 window. The Engine must have been built using EngineRequirements::presentation() and window.required_instance_extensions().
pub fn has_swapchain( &self ) -> bool
Create a presentation session for one SDL3 window. The Engine must have been built using EngineRequirements::presentation() and window.required_instance_extensions().
pub fn swapchain_image_count( &self ) -> usize
No public source comment is attached to this declaration.
pub fn frames_in_flight( &self ) -> usize
No public source comment is attached to this declaration.
pub fn present_empty_frame( &mut self ) -> Result<bool>
No public source comment is attached to this declaration.
pub fn present_clear_frame( &mut self, color: Color ) -> Result<bool>
No public source comment is attached to this declaration.
pub fn present_texture( &mut self, texture: &Texture ) -> Result<bool>
No public source comment is attached to this declaration.
pub fn present_compose( &mut self, compose_image: Image, compose_width: u32, compose_height: u32, descriptor_set: DescriptorSet, pipeline_layout: PipelineLayout, record: impl FnOnce(&Device, CommandBuffer) -> Result<()> ) -> Result<bool>
No public source comment is attached to this declaration.
pub fn swapchain_extent_px( &self ) -> Option<[u32; 2]>
No public source comment is attached to this declaration.
fn drop( &mut self )
No public source comment is attached to this declaration.
pub fn new( engine: &Engine, window: &'window SdlWindow ) -> Result<Self>
No public source comment is attached to this declaration.