vkmEngine 1.0.15
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::RenderObjects Struct Reference

Every object the frame can draw, written once by the cull, and the lists of what each reader draws. More...

#include <render_objects.h>

Public Attributes

std::vector< glm::mat4 > models
 World matrices.
std::vector< Math::AABB > bounds
 World boxes, posed for a posed mesh.
std::vector< uint32_t > skinFirst
 Per object: where its bones start in RenderView::skinMatrices.
std::vector< uint32_t > visible
 The objects the camera sees, in object order, unsorted.
std::vector< uint32_t > scene
 Every drawn object, camera or not, shadow casters first.
uint32_t casterCount = 0
 How many of scene cast shadows, which are its prefix.
std::vector< uint32_t > changed
 The objects whose matrix, box, draw, first bone or place in the scene-wide list or its caster prefix differ from the last frame's, in object order.
bool allChanged = true
 Every object may differ from the last frame's: the world or the asset graph was replaced, the frame before published none, or a fixed object moved in it.
uint64_t fixedSerial = 0
 Moved by every frame the cull writes (serial) in which a fixed object (ObjectDraw::fixed) changed, was listed or unlisted, or became or stopped being fixed, or in which allChanged holds.
uint64_t serial = 0
 Counts the frames the cull wrote; changed is against the one before.

Detailed Description

Every object the frame can draw, written once by the cull, and the lists of what each reader draws.

An object index is the Mesh's place in its storage this frame. The per-object arrays are parallel and sized to every Mesh; an index no list names holds stale data. Owned by Visibility, borrowed by RenderView.

Member Data Documentation

◆ skinFirst

std::vector<uint32_t> Vkm::Engine::RenderObjects::skinFirst

Per object: where its bones start in RenderView::skinMatrices.

Zero when ObjectDraw::skinCount is.

◆ scene

std::vector<uint32_t> Vkm::Engine::RenderObjects::scene

Every drawn object, camera or not, shadow casters first.

For drawing that is not the camera's: shadows and captures.

◆ changed

std::vector<uint32_t> Vkm::Engine::RenderObjects::changed

The objects whose matrix, box, draw, first bone or place in the scene-wide list or its caster prefix differ from the last frame's, in object order.

An index that now holds another Mesh - added, or moved there by a removal - is among them. A reader keeping a copy of the per-object arrays - the GPU's - resizes it to theirs, keeping what it held, and refreshes these alone. Empty while allChanged.

◆ allChanged

bool Vkm::Engine::RenderObjects::allChanged = true

Every object may differ from the last frame's: the world or the asset graph was replaced, the frame before published none, or a fixed object moved in it.

A copy is rebuilt whole.

◆ fixedSerial

uint64_t Vkm::Engine::RenderObjects::fixedSerial = 0

Moved by every frame the cull writes (serial) in which a fixed object (ObjectDraw::fixed) changed, was listed or unlisted, or became or stopped being fixed, or in which allChanged holds.

A frame it does not write leaves it, and the next it writes moves it. While it holds every fixed object is as it was: what the fixed objects draw into a held picture - a shadow tile's - is the same.

◆ serial

uint64_t Vkm::Engine::RenderObjects::serial = 0

Counts the frames the cull wrote; changed is against the one before.

A reader that did not see that frame rebuilds its copy whole, as for allChanged.


The documentation for this struct was generated from the following file: