![]() |
vkmEngine 1.0.0
A C++ game engine · vkmengine.com
|
The backend-agnostic view of the frame handed to RenderBackend::render. More...
#include <render_view.h>
Public Member Functions | |
| void | build (const Scene &scene, const Visibility &visibility, const UIDrawData *ui, const SplashFrame *splash, const PoseBuffer *poses, const LiveParticles *particles) |
| Refill the view for the current frame. | |
Public Attributes | |
| uint32_t | viewportX = 0 |
| Viewport rect within the backbuffer, top-left origin (surfaceHeight flips it). | |
| uint32_t | surfaceWidth = 0 |
| Full backbuffer width. | |
| uint32_t | surfaceHeight = 0 |
| Full backbuffer height. | |
| bool | hasCamera = false |
| Whether a camera resolved this frame. | |
| const RenderObjects * | objects = nullptr |
| Every object the frame can draw, and the lists naming which each reader draws. | |
| std::vector< ParticleData > | particlesAdditive |
| Order-independent. | |
| std::vector< ParticleData > | particlesAlpha |
| Unsorted; the backend orders them. | |
| IrradianceVolumeData | irradianceVolume {} |
| The scene's baked-GI volume, meaningful while hasIrradianceVolume. | |
| const std::vector< glm::mat4 > * | skinMatrices = nullptr |
| The frame's bone palettes: PoseBuffer::palette(), borrowed whole. | |
| const UIDrawData * | ui = nullptr |
| Borrowed; null when the UISystem has not run. | |
| uint64_t | worldEpoch = 0 |
| Scene::epoch() at build time: which world these items came from. | |
The backend-agnostic view of the frame handed to RenderBackend::render.
The whole engine -> backend contract besides the asset graph. build() refills it each frame: what it gathers from the scene it owns; other systems' products it borrows by pointer, valid until the next build().
| void Vkm::Engine::RenderView::build | ( | const Scene & | scene, |
| const Visibility & | visibility, | ||
| const UIDrawData * | ui, | ||
| const SplashFrame * | splash, | ||
| const PoseBuffer * | poses, | ||
| const LiveParticles * | particles ) |
Refill the view for the current frame.
With no active camera the 3D half is emitted empty (cleared, not stale); ui and splash still pass through.
| scene | Scene the lights, probes, decals, emitters and volume are gathered from. |
| visibility | This frame's cull: its camera, and the borrowed objects. |
| ui | The UISystem's draw list, or null. |
| splash | The SplashSystem's product, or null once the sequence is over. |
| poses | This frame's pose, or null (or empty) when nothing posed: objects then draw bind poses. |
| particles | ParticleSystem's live particles, or null if it has not run. |
| bool Vkm::Engine::RenderView::hasCamera = false |
Whether a camera resolved this frame.
Without one the scene lists are left empty and say nothing about the scene, so a backend keeps its per-probe or per-volume captures.
| const RenderObjects* Vkm::Engine::RenderView::objects = nullptr |
Every object the frame can draw, and the lists naming which each reader draws.
Borrowed from the cull's Visibility. Never null once build() has run.
| IrradianceVolumeData Vkm::Engine::RenderView::irradianceVolume {} |
The scene's baked-GI volume, meaningful while hasIrradianceVolume.
One only (see GLIrradianceVolume); chosen by findIrradianceVolume.
| const std::vector<glm::mat4>* Vkm::Engine::RenderView::skinMatrices = nullptr |
The frame's bone palettes: PoseBuffer::palette(), borrowed whole.
One flat buffer; an object finds its bones through skinFirst. Null on a frame that posed nothing, so a backend can skip all skinned work.
| uint64_t Vkm::Engine::RenderView::worldEpoch = 0 |
Scene::epoch() at build time: which world these items came from.
A replaced world reuses entity slots and poses, so a backend's baked captures need this to tell they belong to a scene that is gone.