debug
Generated Rust API reference for byte_engine.
byte_engine / rendering / debug
Module debug
Retained wireframe geometry for renderer and gameplay diagnostics. Retained wireframe geometry for renderer and gameplay diagnostics.
Register the pass with
crate::application::graphics::setup_debug_mesh_render_pass, then create
DebugMesh values through the returned factory. Derive a replacement under
the same handle to update a mesh, or delete its handle through the world.
Quick Reference
| Item | Kind | Description |
|---|---|---|
DebugMeshRenderPass | struct | |
DebugSceneManager | struct | |
DebugMesh | struct | The DebugMesh struct describes retained diagnostic geometry shared by every render sink. |
DebugShape | enum | The DebugShape enum describes world-space geometry expanded by the debug scene manager. |
DebugDepthMode | enum | The DebugDepthMode enum selects whether a debug shape is hidden by nearer scene geometry. |
Structs
DebugMeshRenderPass
struct DebugMeshRenderPass {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/rendering/debug/render_pass.rs:8-19
The DebugMeshRenderPass struct composites wireframe diagnostic meshes over one sink's current color image.
Register it through crate::application::graphics::setup_debug_mesh_render_pass.
Register that setup after tone mapping, all other post-processing, and any
overlay it should cover to keep debug colors unchanged and on top. The pass
can also run before tone mapping when post-processed, scene-linear debug
colors are useful.
Implementations
-
fn new(render_pass_builder: &mut RenderPassBuilder<'_>, scene: Rc<RefCell<DebugSceneManager>>) -> SelfRelated:
RenderPassBuilder,DebugSceneManagerCreates one sink-local compositing pass backed by the shared debug scene.
Trait Implementations
impl ArchivePointee for DebugMeshRenderPass
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for DebugMeshRenderPass
impl Downcast for DebugMeshRenderPass
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl Instrument for DebugMeshRenderPass
impl LayoutRaw for DebugMeshRenderPass
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for DebugMeshRenderPass
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for DebugMeshRenderPass
-
type Metadata = ()
impl Read for DebugMeshRenderPass
impl RenderPass for DebugMeshRenderPass
-
fn name(&self) -> &'static str -
fn prepare<'a>(&mut self, frame: &mut ghi::implementation::Frame<'_>, sink: &Sink, frame_allocator: &'a bumpalo::Bump) -> Option<RenderPassReturn<'a>>Related:
Sink,RenderPassReturnPrepares copies and wireframe draws while preserving the incoming color and scene depth images.
-
fn bypass<'a>(&mut self, frame: &mut ghi::implementation::Frame<'_>, sink: &Sink, frame_allocator: &'a bumpalo::Bump) -> Option<RenderPassReturn<'a>>Related:
Sink,RenderPassReturn
impl WithSubscriber for DebugMeshRenderPass
DebugSceneManager
struct DebugSceneManager {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/rendering/debug/scene_manager.rs:6-10
The DebugSceneManager struct owns reusable geometry and the retained debug scene shared by render sinks.
Applications normally create it through
crate::application::graphics::setup_debug_mesh_render_pass and manage
meshes through the returned crate::core::factory::Factory.
Implementations
-
fn new(context: &mut ghi::implementation::Context, listener: DefaultListener<CreateMessage<DebugMesh>>, delete_listener: DefaultListener<DeleteMessage>) -> SelfRelated:
DebugMeshCreates the shared scene and uploads each reusable unit mesh once.
Trait Implementations
impl ArchivePointee for DebugSceneManager
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for DebugSceneManager
impl Downcast for DebugSceneManager
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for DebugSceneManager
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for DebugSceneManager
impl LayoutRaw for DebugSceneManager
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for DebugSceneManager
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for DebugSceneManager
-
type Metadata = ()
impl Read for DebugSceneManager
impl WithSubscriber for DebugSceneManager
DebugMesh
struct DebugMesh {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/rendering/debug/mod.rs:49-53
The DebugMesh struct describes retained diagnostic geometry shared by every render sink.
Create a message with Self::new, optionally select Self::depth_mode,
then publish it through the factory returned by
crate::application::graphics::setup_debug_mesh_render_pass.
Implementations
-
const fn new(shape: DebugShape, color: RGBA) -> SelfRelated:
DebugShapeCreates a retained, scene-depth-aware debug mesh.
-
const fn depth_mode(self, depth_mode: DebugDepthMode) -> SelfRelated:
DebugDepthModeSelects whether this shape tests against the scene depth image.
-
const fn shape(self) -> DebugShapeRelated:
DebugShapeReturns the world-space shape carried by this message.
-
const fn color(self) -> RGBAReturns the straight-alpha color written by the debug fragment shader.
-
const fn selected_depth_mode(self) -> DebugDepthModeRelated:
DebugDepthModeReturns the scene-depth behavior selected for this shape.
Trait Implementations
impl ArchivePointee for DebugMesh
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for DebugMesh
impl Clone for DebugMesh
-
fn clone(&self) -> DebugMeshRelated:
DebugMesh
impl Copy for DebugMesh
impl Debug for DebugMesh
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for DebugMesh
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for DebugMesh
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for DebugMesh
impl LayoutRaw for DebugMesh
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for DebugMesh
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for DebugMesh
-
fn eq(&self, other: &DebugMesh) -> boolRelated:
DebugMesh
impl Pointee for DebugMesh
-
type Metadata = ()
impl Read for DebugMesh
impl StructuralPartialEq for DebugMesh
impl WithSubscriber for DebugMesh
Enums
DebugShape
enum DebugShape {
Sphere {
center: math::Point,
radius: f32,
},
Box {
center: math::Point,
half_extents: math::Vector,
orientation: math::Orientation,
},
Capsule {
start: math::Point,
end: math::Point,
radius: f32,
},
Segment {
start: math::Point,
end: math::Point,
},
Circle {
center: math::Point,
radius: f32,
normal: math::UnitVector,
},
}Defined in crates/byte-engine/src/rendering/debug/mod.rs:16-31
The DebugShape enum describes world-space geometry expanded by the debug scene manager.
Variants
-
SphereA sphere centered at
centerwith a world-spaceradius. -
BoxAn oriented box whose size extends by
half_extentsfromcenter. -
CapsuleA capsule whose center line runs from
starttoend. -
SegmentA thin line segment between two world-space endpoints.
-
CircleA circle of
radiusaroundcenterin the planenormalis perpendicular to, such as a footprint on the floor.
Trait Implementations
impl ArchivePointee for DebugShape
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for DebugShape
impl Clone for DebugShape
-
fn clone(&self) -> DebugShapeRelated:
DebugShape
impl Copy for DebugShape
impl Debug for DebugShape
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for DebugShape
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for DebugShape
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for DebugShape
impl LayoutRaw for DebugShape
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for DebugShape
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for DebugShape
-
fn eq(&self, other: &DebugShape) -> boolRelated:
DebugShape
impl Pointee for DebugShape
-
type Metadata = ()
impl Read for DebugShape
impl StructuralPartialEq for DebugShape
impl WithSubscriber for DebugShape
DebugDepthMode
enum DebugDepthMode {
Scene,
Ignore,
}Defined in crates/byte-engine/src/rendering/debug/mod.rs:35-41
The DebugDepthMode enum selects whether a debug shape is hidden by nearer scene geometry.
Variants
-
SceneTests against the depth image produced by the active scene pipeline without changing it.
-
IgnoreDraws after depth-aware debug geometry without a depth attachment.
Trait Implementations
impl ArchivePointee for DebugDepthMode
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for DebugDepthMode
impl Clone for DebugDepthMode
-
fn clone(&self) -> DebugDepthModeRelated:
DebugDepthMode
impl Copy for DebugDepthMode
impl Debug for DebugDepthMode
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Default for DebugDepthMode
-
fn default() -> DebugDepthModeRelated:
DebugDepthMode
impl Downcast for DebugDepthMode
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for DebugDepthMode
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for DebugDepthMode
impl<K> Equivalent for DebugDepthMode
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for DebugDepthMode
impl LayoutRaw for DebugDepthMode
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for DebugDepthMode
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for DebugDepthMode
-
fn eq(&self, other: &DebugDepthMode) -> boolRelated:
DebugDepthMode
impl Pointee for DebugDepthMode
-
type Metadata = ()