pub struct RenderCore {
pub device: Device,
pub queue: Queue,
/* private fields */
}Expand description
The window-agnostic renderer: pipelines + layouts for one color format.
Fields§
§device: Device§queue: QueueImplementations§
Source§impl RenderCore
impl RenderCore
pub fn new(device: Device, queue: Queue, format: TextureFormat) -> Self
Source§impl RenderCore
impl RenderCore
Sourcepub fn sync_scene(
&self,
gpu: &mut GpuScene,
scene: &RenderScene,
settings: &RenderSettings,
settings_generation: u64,
)
pub fn sync_scene( &self, gpu: &mut GpuScene, scene: &RenderScene, settings: &RenderSettings, settings_generation: u64, )
Bring the GPU scene in line with the display scene: new/changed solids
upload, unchanged solids keep their buffers (R10), removed solids drop
theirs. settings_generation invalidates per-solid style buffers only.
Sourcepub fn upload_scene(&self, scene: &RenderScene) -> GpuScene
pub fn upload_scene(&self, scene: &RenderScene) -> GpuScene
Upload a scene from scratch (artifact/one-shot path).
pub fn upload_scene_with( &self, scene: &RenderScene, settings: &RenderSettings, ) -> GpuScene
Source§impl RenderCore
impl RenderCore
Sourcepub fn render_to_view(
&mut self,
gpu_scene: &mut GpuScene,
scene: &RenderScene,
params: &FrameParams<'_>,
resolve_view: &TextureView,
)
pub fn render_to_view( &mut self, gpu_scene: &mut GpuScene, scene: &RenderScene, params: &FrameParams<'_>, resolve_view: &TextureView, )
Render one frame into resolve_view (a single-sample view of the
core’s format). This is the whole engine core; every presentation shell
funnels through it.
Sourcepub fn render_to_view_with_context(
&mut self,
gpu_scene: &mut GpuScene,
scene: &RenderScene,
params: &FrameParams<'_>,
resolve_view: &TextureView,
context: Option<(&GpuScene, &RenderScene)>,
)
pub fn render_to_view_with_context( &mut self, gpu_scene: &mut GpuScene, scene: &RenderScene, params: &FrameParams<'_>, resolve_view: &TextureView, context: Option<(&GpuScene, &RenderScene)>, )
Draw optional, non-pickable assembly context after the opaque work part.
Sourcepub fn render_to_png(
&mut self,
scene: &RenderScene,
camera: &Camera,
width: u32,
height: u32,
) -> Result<Vec<u8>, String>
pub fn render_to_png( &mut self, scene: &RenderScene, camera: &Camera, width: u32, height: u32, ) -> Result<Vec<u8>, String>
Headless capture (R32/R34): render the scene and return PNG bytes (8-bit RGB, no ancillary chunks — deterministic, R33).
Sourcepub fn render_gpu_scene_to_rgb(
&mut self,
gpu_scene: &mut GpuScene,
scene: &RenderScene,
camera: &Camera,
width: u32,
height: u32,
settings: &RenderSettings,
) -> Result<Vec<u8>, String>
pub fn render_gpu_scene_to_rgb( &mut self, gpu_scene: &mut GpuScene, scene: &RenderScene, camera: &Camera, width: u32, height: u32, settings: &RenderSettings, ) -> Result<Vec<u8>, String>
Draw scene through gpu_scene (synced or uploaded by the caller) at
width×height under settings and read the frame back as packed
RGB, top row first: what a motion study’s video export encodes frame
by frame with the viewport’s own render core and the user’s settings.
Auto Trait Implementations§
impl !RefUnwindSafe for RenderCore
impl !UnwindSafe for RenderCore
impl Freeze for RenderCore
impl Send for RenderCore
impl Sync for RenderCore
impl Unpin for RenderCore
impl UnsafeUnpin for RenderCore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.