Struct ccthw::graphics::vulkan_api::BindlessTriangles
source · pub struct BindlessTriangles { /* private fields */ }
Expand description
A utility for rendering high-performance textured triangles using bindless textures.
Implementations§
source§impl BindlessTriangles
impl BindlessTriangles
sourcepub unsafe fn new(
render_device: Arc<RenderDevice>,
render_pass: &RenderPass,
frames_in_flight: &FramesInFlight,
textures: &[Arc<Texture2D>]
) -> Result<Self, GraphicsError>
pub unsafe fn new( render_device: Arc<RenderDevice>, render_pass: &RenderPass, frames_in_flight: &FramesInFlight, textures: &[Arc<Texture2D>] ) -> Result<Self, GraphicsError>
Create a new instance of bindless triangles.
Safety
Unsafe because:
- This instance must be dropped before the RenderDevice is destroyed.
pub fn write_vertices_for_frame( &mut self, frame: &Frame, vertices: &[BindlessVertex] ) -> Result<(), GraphicsError>
sourcepub unsafe fn draw_vertices(
&self,
frame: &Frame,
viewport: Extent2D
) -> Result<(), GraphicsError>
pub unsafe fn draw_vertices( &self, frame: &Frame, viewport: Extent2D ) -> Result<(), GraphicsError>
Add commands to the frame’s command buffer to draw the vertices.
Safety
Unsafe because:
- The render pass must already be started.
Auto Trait Implementations§
impl RefUnwindSafe for BindlessTriangles
impl !Send for BindlessTriangles
impl !Sync for BindlessTriangles
impl Unpin for BindlessTriangles
impl UnwindSafe for BindlessTriangles
Blanket Implementations§
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.