pub struct Gpu3DPipeline {
pub vertex_buffer: GpuBufferHandle,
pub index_buffer: GpuBufferHandle,
pub uniform_buffer: GpuBufferHandle,
pub depth_stencil: GpuDepthStencilState,
pub viewport_width: u32,
pub viewport_height: u32,
pub early_z_culled_fragments: usize,
pub total_tested_fragments: usize,
}Expand description
Hardware GPU 3D rendering pipeline managing vertex/index buffers and draw passes.
Fields§
§vertex_buffer: GpuBufferHandle§index_buffer: GpuBufferHandle§uniform_buffer: GpuBufferHandle§depth_stencil: GpuDepthStencilState§viewport_width: u32§viewport_height: u32§early_z_culled_fragments: usize§total_tested_fragments: usizeImplementations§
Source§impl Gpu3DPipeline
impl Gpu3DPipeline
Sourcepub fn new(device: &GpuDevice, width: u32, height: u32) -> Self
pub fn new(device: &GpuDevice, width: u32, height: u32) -> Self
Creates a new 3D GPU pipeline on the specified device.
Sourcepub fn test_early_z(&mut self, current_depth: f32, new_depth: f32) -> bool
pub fn test_early_z(&mut self, current_depth: f32, new_depth: f32) -> bool
Evaluates hardware early-Z fragment occlusion test, updating occlusion stats.
Sourcepub fn render_scene(
&mut self,
device: &mut GpuDevice,
scene: &Scene3D,
viewport: Rect,
clip: Option<Rect>,
)
pub fn render_scene( &mut self, device: &mut GpuDevice, scene: &Scene3D, viewport: Rect, clip: Option<Rect>, )
Renders a Scene3D directly onto the hardware GPU device target, resolving any
crate::texture3d::TextureStore attached to scene.
Sourcepub fn render_scene_with_textures(
&mut self,
device: &mut GpuDevice,
scene: &Scene3D,
viewport: Rect,
clip: Option<Rect>,
textures: Option<&TextureStore>,
)
pub fn render_scene_with_textures( &mut self, device: &mut GpuDevice, scene: &Scene3D, viewport: Rect, clip: Option<Rect>, textures: Option<&TextureStore>, )
Renders a Scene3D onto the hardware GPU device target using textures (or scene.textures_deref()).
Sourcepub fn render_rte_mesh(
&mut self,
device: &mut GpuDevice,
uniforms: &GpuRteUniforms,
vertices: &[GpuRteVertex],
indices: &[u32],
viewport: Rect,
clip: Option<Rect>,
)
pub fn render_rte_mesh( &mut self, device: &mut GpuDevice, uniforms: &GpuRteUniforms, vertices: &[GpuRteVertex], indices: &[u32], viewport: Rect, clip: Option<Rect>, )
Renders a Relative-To-Eye (RTE) double-single mesh using GPU vertex shaders.
Auto Trait Implementations§
impl Forget for Gpu3DPipeline
impl Freeze for Gpu3DPipeline
impl Move for Gpu3DPipeline
impl RefUnwindSafe for Gpu3DPipeline
impl Send for Gpu3DPipeline
impl Sync for Gpu3DPipeline
impl Unpin for Gpu3DPipeline
impl UnsafeUnpin for Gpu3DPipeline
impl UnwindSafe for Gpu3DPipeline
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