Byte Engine Docs
View on docs.rs

rendering

Generated Rust API reference for byte_engine.

byte_engine / rendering


Module rendering

Rendering orchestration, scene pipelines, and composable post-processing.

renderer::Renderer owns GHI resources and executes RenderPass values for each Sink. Applications normally configure it through the setup functions in crate::application::graphics. Implement pipeline_manager::PipelineManager for scene rendering strategies and RenderPass for sink-local post-processing.

Use pipelines::simple for debugging or prototypes. The pipelines::visibility pipeline is the primary material and lighting path.

Follow the physically based lighting reference to create and submit scene lights with lux, candela, lumens, or nits.

Contents

Quick Reference

ItemKindDescription
cameramodCamera state used to derive scene views.
resource_loadingmodShared asynchronous render-resource loading and GPU upload lifecycle.
sinkmodPer-output render target state passed to render passes.
viewmodProjection and view matrix construction for cameras and lights.
Camerastruct
Environmentstruct
PipelineKeystruct
PipelineManagerClientstruct
PipelineManagerServerstruct
PipelineRefstruct
UpdatePosestruct
Sinkstruct
Viewstruct
PipelineStateenum
map_shader_binding_to_shader_binding_descriptorfnMaps a shader resource binding to a GHI shader binding descriptor.
create_shader_from_sourcefnCompiles shader source and creates a GHI shader handle for render pipeline setup.
make_perspective_view_from_camerafnBuilds a perspective [View] from a scene camera and render target extent.

Modules

  • camera — Camera state used to derive scene views.
  • resource_loading — Shared asynchronous render-resource loading and GPU upload lifecycle.
  • sink — Per-output render target state passed to render passes.
  • view — Projection and view matrix construction for cameras and lights.

Structs

Camera

struct Camera {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/camera.rs:3-8

The Camera struct provides scene-owned world-space view settings to render sinks and inspection tools.

Implementations

  • fn new() -> Self

    Creates a camera with a world-origin position and default perspective settings.

  • fn vertical_fov(&self) -> Degrees

    Returns the camera's vertical field of view.

  • fn aspect_ratio(&self) -> f32

    Returns the camera's width-to-height aspect ratio.

  • fn aperture(&self) -> f32

    Returns the camera aperture.

  • fn focus_distance(&self) -> f32

    Returns the camera focus distance.

  • fn with_fov(self, fov: Degrees) -> Self

    Sets the vertical field of view used by perspective rendering.

  • fn set_fov(&mut self, fov: Degrees)

    Sets the vertical field of view used by perspective rendering.

Trait Implementations

impl ArchivePointee for Camera
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Camera
impl Clone for Camera
  • fn clone(&self) -> Camera

    Related: Camera

impl Debug for Camera
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Default for Camera
  • fn default() -> Self
impl Downcast for Camera
  • 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 DowncastSend for Camera
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for Camera
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Inspectable for Camera
  • fn as_string(&self) -> String
  • fn set(&mut self, key: &str, value: &str) -> Result<(), String>
impl Instrument for Camera
impl LayoutRaw for Camera
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Camera
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointable for Camera
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for Camera
  • type Metadata = ()
impl Read for Camera
impl<R> ReadPrimitive for Camera
impl WithSubscriber for Camera

Environment

struct Environment {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/environment.rs:6-8

The Environment struct identifies the baked image used for scene lighting and reflections.

Create an environment through crate::gameplay::world::DefaultWorld::factory after installing the visibility pipeline.

Implementations

  • fn new(resource_id: impl Into<String>) -> Self

    Creates an environment backed by the named baked image resource.

  • fn resource_id(&self) -> &str

    Returns the baked image resource used to load this environment.

Trait Implementations

impl ArchivePointee for Environment
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Environment
impl Clone for Environment
impl Debug for Environment
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for Environment
  • 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 DowncastSend for Environment
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for Environment
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for Environment
impl<K> Equivalent for Environment
  • fn equivalent(&self, key: &K) -> bool
impl Instrument for Environment
impl LayoutRaw for Environment
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Environment
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for Environment
  • fn eq(&self, other: &Environment) -> bool

    Related: Environment

impl Pointable for Environment
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for Environment
  • type Metadata = ()
impl Read for Environment
impl StructuralPartialEq for Environment
impl WithSubscriber for Environment

PipelineKey

struct PipelineKey();

Defined in crates/byte-engine/src/rendering/pipeline_compilation.rs:8

The PipelineKey struct identifies one complete pipeline compilation input.

The manager derives this value from the resource ID passed to PipelineManagerClient::request_pipeline.

Implementations

  • const fn new(value: u64) -> Self

    Creates a stable key from a hash of the complete pipeline description.

Trait Implementations

impl ArchivePointee for PipelineKey
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for PipelineKey
impl Clone for PipelineKey
impl Copy for PipelineKey
impl Debug for PipelineKey
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for PipelineKey
  • 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 DowncastSend for PipelineKey
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for PipelineKey
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for PipelineKey
impl<K> Equivalent for PipelineKey
  • fn equivalent(&self, key: &K) -> bool
impl Hash for PipelineKey
  • fn hash<__H: hash::Hasher>(&self, state: &mut __H)
impl Instrument for PipelineKey
impl LayoutRaw for PipelineKey
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for PipelineKey
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for PipelineKey
  • fn eq(&self, other: &PipelineKey) -> bool

    Related: PipelineKey

impl Pointable for PipelineKey
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for PipelineKey
  • type Metadata = ()
impl Read for PipelineKey
impl StructuralPartialEq for PipelineKey
impl WithSubscriber for PipelineKey

PipelineManagerClient

struct PipelineManagerClient {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/pipeline_compilation.rs:75-78

The PipelineManagerClient struct lets renderer dependants request and poll asynchronously compiled pipelines without blocking.

Clone this client for each dependant. Requests with the same PipelineKey are coalesced before they reach a compilation server.

Implementations

  • fn request_pipeline(&self, id: &str) -> PipelineRef

    Related: PipelineRef

    Requests a pipeline resource without waiting for storage or compilation.

  • fn get(&self, pipeline: PipelineRef) -> PipelineState

    Related: PipelineRef, PipelineState

    Returns the state published for a pipeline without draining worker results.

  • fn pipeline(&self, pipeline: PipelineRef) -> Option<ghi::PipelineHandle>

    Related: PipelineRef

    Returns a published pipeline handle, or None while it is unavailable.

Trait Implementations

impl ArchivePointee for PipelineManagerClient
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for PipelineManagerClient
impl Clone for PipelineManagerClient
impl Downcast for PipelineManagerClient
  • 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 DowncastSend for PipelineManagerClient
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for PipelineManagerClient
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for PipelineManagerClient
impl LayoutRaw for PipelineManagerClient
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for PipelineManagerClient
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointable for PipelineManagerClient
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for PipelineManagerClient
  • type Metadata = ()
impl Read for PipelineManagerClient
impl WithSubscriber for PipelineManagerClient

PipelineManagerServer

struct PipelineManagerServer {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/pipeline_compilation.rs:191-196

The PipelineManagerServer struct compiles requests using one detached GHI factory.

Call Self::run directly from a dedicated thread. The server does not own or spawn that thread, so a future thread pool can run the same work loop.

Implementations

  • async fn run(self)

    Compiles requests until every client sender is dropped.

Trait Implementations

impl ArchivePointee for PipelineManagerServer
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for PipelineManagerServer
impl Downcast for PipelineManagerServer
  • 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 DowncastSend for PipelineManagerServer
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl Instrument for PipelineManagerServer
impl LayoutRaw for PipelineManagerServer
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for PipelineManagerServer
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointable for PipelineManagerServer
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for PipelineManagerServer
  • type Metadata = ()
impl Read for PipelineManagerServer
impl WithSubscriber for PipelineManagerServer

PipelineRef

struct PipelineRef();

Defined in crates/byte-engine/src/rendering/pipeline_compilation.rs:23

The PipelineRef struct keeps a stable reference to a requested pipeline.

Poll it with PipelineManagerClient::get during frame preparation. A compiled pipeline becomes visible only after the renderer publishes results at the start of a frame.

Trait Implementations

impl ArchivePointee for PipelineRef
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for PipelineRef
impl Clone for PipelineRef
impl Copy for PipelineRef
impl Debug for PipelineRef
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for PipelineRef
  • 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 DowncastSend for PipelineRef
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for PipelineRef
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for PipelineRef
impl<K> Equivalent for PipelineRef
  • fn equivalent(&self, key: &K) -> bool
impl Hash for PipelineRef
  • fn hash<__H: hash::Hasher>(&self, state: &mut __H)
impl Instrument for PipelineRef
impl LayoutRaw for PipelineRef
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for PipelineRef
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for PipelineRef
  • fn eq(&self, other: &PipelineRef) -> bool

    Related: PipelineRef

impl Pointable for PipelineRef
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for PipelineRef
  • type Metadata = ()
impl Read for PipelineRef
impl StructuralPartialEq for PipelineRef
impl WithSubscriber for PipelineRef

UpdatePose

struct UpdatePose {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/pose.rs:3-6

The UpdatePose struct carries one renderable's global skeleton pose from gameplay to rendering.

Implementations

  • fn new(handle: Handle, global_matrices: Vec<Matrix>) -> Self

    Creates a pose update for one renderable.

  • fn handle(&self) -> Handle

    Returns the renderable that owns the pose.

  • fn global_matrices(&self) -> &[Matrix]

    Returns the global matrix for each skeleton joint.

Trait Implementations

impl ArchivePointee for UpdatePose
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for UpdatePose
impl Clone for UpdatePose
  • fn clone(&self) -> UpdatePose

    Related: UpdatePose

impl Debug for UpdatePose
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for UpdatePose
  • 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 DowncastSend for UpdatePose
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for UpdatePose
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for UpdatePose
impl LayoutRaw for UpdatePose
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for UpdatePose
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointable for UpdatePose
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for UpdatePose
  • type Metadata = ()
impl Read for UpdatePose
impl WithSubscriber for UpdatePose

Sink

struct Sink {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/sink.rs:11-15

The Sink struct provides a per-frame render destination for a resolved camera view.

It keeps the view transform, renderable extent, and renderer sink index together while scene managers and render passes prepare an output surface.

Implementations

  • fn new(view: View, extent: Extent, index: usize) -> Self

    Related: View

    Creates a sink for render passes that target a specific view and extent.

  • fn view(&self) -> View

    Related: View

    Returns the camera or light view used by this render target.

  • fn extent(&self) -> Extent

    Returns the pixel extent available to render passes for this sink.

  • fn view_projection(&self) -> Matrix

    Returns the combined projection and view matrix for shader setup.

  • fn index(&self) -> usize

    Returns the renderer-local sink index.

Trait Implementations

impl ArchivePointee for Sink
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Sink
impl Clone for Sink
  • fn clone(&self) -> Sink

    Related: Sink

impl Copy for Sink
impl Debug for Sink
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for Sink
  • 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 DowncastSend for Sink
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for Sink
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for Sink
impl LayoutRaw for Sink
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Sink
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointable for Sink
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for Sink
  • type Metadata = ()
impl Read for Sink
impl WithSubscriber for Sink

View

struct View {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/view.rs:9-17

The View struct provides projection and orientation data shared by cameras, lights, render sinks, and shader setup.

Implementations

  • fn new_perspective(fov: Degrees, aspect_ratio: f32, near: f32, far: f32, position: Point, direction: UnitVector) -> Self

    Creates a perspective view for camera-style scene rendering.

  • fn new_perspective_with_up(fov: Degrees, aspect_ratio: f32, near: f32, far: f32, position: Point, direction: UnitVector, up: UnitVector) -> Self

    Creates a perspective view with an explicit up direction when a stable image orientation matters.

  • fn new_orthographic(left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32, position: Point, direction: UnitVector) -> Self

    Creates an orthographic view for light, editor, or flat scene rendering.

  • fn from_view(&self, view: Matrix) -> Self

    Creates a view that shares this projection but uses a caller-provided view matrix.

  • fn from_from_z_planes(&self, near: f32, far: f32) -> Self

    Creates a perspective view with this view's settings and new clipping planes.

  • fn projection(&self) -> Matrix

    Returns the projection matrix.

  • fn view(&self) -> Matrix

    Returns the view matrix.

  • fn projection_view(&self) -> Matrix

    Returns the projection matrix multiplied by the view matrix.

  • fn view_projection(&self) -> Matrix

    Returns the projection matrix multiplied by the view matrix.

  • fn x_fov(&self) -> Degrees

    Returns the horizontal field of view derived from the vertical field of view.

  • fn y_fov(&self) -> Degrees

    Returns the vertical field of view used by perspective projections.

  • fn near(&self) -> f32

    Returns the near clipping plane distance.

  • fn far(&self) -> f32

    Returns the far clipping plane distance.

  • fn fov(&self) -> [f32; 2]

    Returns the horizontal and vertical fields of view.

  • fn aspect_ratio(&self) -> f32

    Returns the width-to-height aspect ratio used by perspective projections.

  • fn get_frustum_corners(&self) -> [Point; 8]

    Returns the view-frustum corners as world-space points.

  • fn get_frustum_planes(&self) -> [Plane; 6]

    Returns the view-frustum planes in world space.

Trait Implementations

impl ArchivePointee for View
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for View
impl Clone for View
  • fn clone(&self) -> View

    Related: View

impl Copy for View
impl Debug for View
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for View
  • 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 DowncastSend for View
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for View
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for View
impl LayoutRaw for View
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for View
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for View
  • fn eq(&self, other: &View) -> bool

    Related: View

impl Pointable for View
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for View
  • type Metadata = ()
impl Read for View
impl StructuralPartialEq for View
impl WithSubscriber for View

Enums

PipelineState

enum PipelineState {
    Pending,
    Ready(ghi::PipelineHandle),
    Failed,
}

Defined in crates/byte-engine/src/rendering/pipeline_compilation.rs:52-59

The PipelineState enum reports the published state of a pipeline request.

Variants

  • Pending

    Compilation is queued or still running.

  • Ready

    Compilation succeeded and published this pipeline handle.

  • Failed

    Loading or compilation failed.

Trait Implementations

impl ArchivePointee for PipelineState
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for PipelineState
impl Clone for PipelineState
impl Copy for PipelineState
impl Debug for PipelineState
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for PipelineState
  • 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 DowncastSend for PipelineState
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for PipelineState
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for PipelineState
impl<K> Equivalent for PipelineState
  • fn equivalent(&self, key: &K) -> bool
impl Instrument for PipelineState
impl LayoutRaw for PipelineState
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for PipelineState
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for PipelineState
  • fn eq(&self, other: &PipelineState) -> bool

    Related: PipelineState

impl Pointable for PipelineState
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for PipelineState
  • type Metadata = ()
impl Read for PipelineState
impl StructuralPartialEq for PipelineState
impl WithSubscriber for PipelineState

Functions

map_shader_binding_to_shader_binding_descriptor

fn map_shader_binding_to_shader_binding_descriptor(b: &resource_management::shader::generator::CompiledShaderBinding) -> ghi::ShaderResourceDescriptor

Defined in crates/byte-engine/src/rendering/mod.rs:96-151

Maps a shader resource binding to a GHI shader binding descriptor.

create_shader_from_source

fn create_shader_from_source(context: &mut ghi::implementation::Context, name: Option<&str>, source: ghi::shader::ShaderSource<'_>, stage: ghi::ShaderTypes, resource_descriptors: impl IntoIterator<Item = ghi::ShaderResourceDescriptor>) -> Result<ghi::ShaderHandle, String>

Defined in crates/byte-engine/src/rendering/mod.rs:158-169

Compiles shader source and creates a GHI shader handle for render pipeline setup.

Returns an error when shader compilation or GHI shader creation fails. The most likely cause is invalid shader source or a binding interface that does not match the selected shader stage.

make_perspective_view_from_camera

fn make_perspective_view_from_camera<T: Positionable + Orientable>(camera: &Camera, po: &T, extent: ::utils::Extent) -> View

Defined in crates/byte-engine/src/rendering/mod.rs:172-193

Builds a perspective View from a scene camera and render target extent.

On this page

Module renderingContentsQuick ReferenceModulesStructsCameraImplementationsTrait Implementationsimpl ArchivePointee for Cameraimpl<ST> CastableFrom for Cameraimpl Clone for Cameraimpl Debug for Cameraimpl Default for Cameraimpl Downcast for Cameraimpl DowncastSend for Cameraimpl DowncastSync for Cameraimpl Inspectable for Cameraimpl Instrument for Cameraimpl LayoutRaw for Cameraimpl<T, N1> Niching for Cameraimpl Pointable for Cameraimpl Pointee for Cameraimpl Read for Cameraimpl<R> ReadPrimitive for Cameraimpl WithSubscriber for CameraEnvironmentImplementationsTrait Implementationsimpl ArchivePointee for Environmentimpl<ST> CastableFrom for Environmentimpl Clone for Environmentimpl Debug for Environmentimpl Downcast for Environmentimpl DowncastSend for Environmentimpl DowncastSync for Environmentimpl Eq for Environmentimpl<K> Equivalent for Environmentimpl Instrument for Environmentimpl LayoutRaw for Environmentimpl<T, N1> Niching for Environmentimpl PartialEq for Environmentimpl Pointable for Environmentimpl Pointee for Environmentimpl Read for Environmentimpl StructuralPartialEq for Environmentimpl WithSubscriber for EnvironmentPipelineKeyImplementationsTrait Implementationsimpl ArchivePointee for PipelineKeyimpl<ST> CastableFrom for PipelineKeyimpl Clone for PipelineKeyimpl Copy for PipelineKeyimpl Debug for PipelineKeyimpl Downcast for PipelineKeyimpl DowncastSend for PipelineKeyimpl DowncastSync for PipelineKeyimpl Eq for PipelineKeyimpl<K> Equivalent for PipelineKeyimpl Hash for PipelineKeyimpl Instrument for PipelineKeyimpl LayoutRaw for PipelineKeyimpl<T, N1> Niching for PipelineKeyimpl PartialEq for PipelineKeyimpl Pointable for PipelineKeyimpl Pointee for PipelineKeyimpl Read for PipelineKeyimpl StructuralPartialEq for PipelineKeyimpl WithSubscriber for PipelineKeyPipelineManagerClientImplementationsTrait Implementationsimpl ArchivePointee for PipelineManagerClientimpl<ST> CastableFrom for PipelineManagerClientimpl Clone for PipelineManagerClientimpl Downcast for PipelineManagerClientimpl DowncastSend for PipelineManagerClientimpl DowncastSync for PipelineManagerClientimpl Instrument for PipelineManagerClientimpl LayoutRaw for PipelineManagerClientimpl<T, N1> Niching for PipelineManagerClientimpl Pointable for PipelineManagerClientimpl Pointee for PipelineManagerClientimpl Read for PipelineManagerClientimpl WithSubscriber for PipelineManagerClientPipelineManagerServerImplementationsTrait Implementationsimpl ArchivePointee for PipelineManagerServerimpl<ST> CastableFrom for PipelineManagerServerimpl Downcast for PipelineManagerServerimpl DowncastSend for PipelineManagerServerimpl Instrument for PipelineManagerServerimpl LayoutRaw for PipelineManagerServerimpl<T, N1> Niching for PipelineManagerServerimpl Pointable for PipelineManagerServerimpl Pointee for PipelineManagerServerimpl Read for PipelineManagerServerimpl WithSubscriber for PipelineManagerServerPipelineRefTrait Implementationsimpl ArchivePointee for PipelineRefimpl<ST> CastableFrom for PipelineRefimpl Clone for PipelineRefimpl Copy for PipelineRefimpl Debug for PipelineRefimpl Downcast for PipelineRefimpl DowncastSend for PipelineRefimpl DowncastSync for PipelineRefimpl Eq for PipelineRefimpl<K> Equivalent for PipelineRefimpl Hash for PipelineRefimpl Instrument for PipelineRefimpl LayoutRaw for PipelineRefimpl<T, N1> Niching for PipelineRefimpl PartialEq for PipelineRefimpl Pointable for PipelineRefimpl Pointee for PipelineRefimpl Read for PipelineRefimpl StructuralPartialEq for PipelineRefimpl WithSubscriber for PipelineRefUpdatePoseImplementationsTrait Implementationsimpl ArchivePointee for UpdatePoseimpl<ST> CastableFrom for UpdatePoseimpl Clone for UpdatePoseimpl Debug for UpdatePoseimpl Downcast for UpdatePoseimpl DowncastSend for UpdatePoseimpl DowncastSync for UpdatePoseimpl Instrument for UpdatePoseimpl LayoutRaw for UpdatePoseimpl<T, N1> Niching for UpdatePoseimpl Pointable for UpdatePoseimpl Pointee for UpdatePoseimpl Read for UpdatePoseimpl WithSubscriber for UpdatePoseSinkImplementationsTrait Implementationsimpl ArchivePointee for Sinkimpl<ST> CastableFrom for Sinkimpl Clone for Sinkimpl Copy for Sinkimpl Debug for Sinkimpl Downcast for Sinkimpl DowncastSend for Sinkimpl DowncastSync for Sinkimpl Instrument for Sinkimpl LayoutRaw for Sinkimpl<T, N1> Niching for Sinkimpl Pointable for Sinkimpl Pointee for Sinkimpl Read for Sinkimpl WithSubscriber for SinkViewImplementationsTrait Implementationsimpl ArchivePointee for Viewimpl<ST> CastableFrom for Viewimpl Clone for Viewimpl Copy for Viewimpl Debug for Viewimpl Downcast for Viewimpl DowncastSend for Viewimpl DowncastSync for Viewimpl Instrument for Viewimpl LayoutRaw for Viewimpl<T, N1> Niching for Viewimpl PartialEq for Viewimpl Pointable for Viewimpl Pointee for Viewimpl Read for Viewimpl StructuralPartialEq for Viewimpl WithSubscriber for ViewEnumsPipelineStateVariantsTrait Implementationsimpl ArchivePointee for PipelineStateimpl<ST> CastableFrom for PipelineStateimpl Clone for PipelineStateimpl Copy for PipelineStateimpl Debug for PipelineStateimpl Downcast for PipelineStateimpl DowncastSend for PipelineStateimpl DowncastSync for PipelineStateimpl Eq for PipelineStateimpl<K> Equivalent for PipelineStateimpl Instrument for PipelineStateimpl LayoutRaw for PipelineStateimpl<T, N1> Niching for PipelineStateimpl PartialEq for PipelineStateimpl Pointable for PipelineStateimpl Pointee for PipelineStateimpl Read for PipelineStateimpl StructuralPartialEq for PipelineStateimpl WithSubscriber for PipelineStateFunctionsmap_shader_binding_to_shader_binding_descriptorcreate_shader_from_sourcemake_perspective_view_from_camera