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_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).
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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 more