Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Manages a collection of mesh instances, current and previous model matrices. More...
#include <foray_drawmanager.hpp>
Public Member Functions | |
DrawDirector () | |
void | InitOrUpdate () |
Collects mesh instances and rebuilds transform buffers. | |
virtual int32_t | GetOrder () const override |
virtual void | Update (SceneUpdateInfo &) override |
Updates and uploads transform buffers. | |
virtual void | Draw (SceneDrawInfo &) override |
Draws the scene using the currently bound pipeline and renderpass. Vertex and Index buffers must be bound. | |
VkDescriptorBufferInfo | GetCurrentTransformsDescriptorInfo () const |
VkDescriptorBufferInfo | GetPreviousTransformsDescriptorInfo () const |
VkBuffer | GetCurrentTransformsVkBuffer () const |
VkBuffer | GetPreviousTransformsVkBuffer () const |
![]() | |
virtual Scene * | GetScene () override |
Scene this component is a part of. Casts mRegistry to Scene. | |
virtual Registry * | GetGlobals () override |
Global component registry. Returns mRegistry. | |
virtual core::Context * | GetContext () override |
Vulkan Context. Casts mRegistry to Scene and returns Scene->GetContext() | |
![]() | |
virtual | ~Component () |
Destructor. Provide virtual constructors in inheriting classes, to make sure they get finalized correctly. | |
![]() | |
NoMoveDefaults ()=default | |
NoMoveDefaults (const NoMoveDefaults &other)=delete | |
NoMoveDefaults (NoMoveDefaults &&other)=default | |
NoMoveDefaults & | operator= (const NoMoveDefaults &other)=delete |
![]() | |
virtual void | Update (TArg updateInfo)=0 |
Invoked first each frame. Use for changes to the node hierarchy and transforms. | |
void | Invoke (TArg updateInfo) |
![]() | |
virtual void | Draw (TArg drawInfo)=0 |
Invoked last each frame. Use to submit draw calls (and related) | |
void | Invoke (TArg drawInfo) |
Protected Member Functions | |
void | CreateBuffers (size_t transformCount) |
void | DestroyBuffers () |
![]() | |
virtual void | __makeMePolymorphic () |
Protected Attributes | |
util::DualBuffer | mCurrentTransformBuffer |
core::ManagedBuffer | mPreviousTransformBuffer |
std::vector< DrawOp > | mDrawOps = {} |
Draw Op structs store draw operation. | |
bool | mFirstSetup = true |
GeometryStore * | mGeo = nullptr |
uint32_t | mTotalCount = 0 |
![]() | |
Registry * | mRegistry = nullptr |
std::string | mName = "" |
Additional Inherited Members | |
![]() | |
using | TArg = SceneUpdateInfo & |
![]() | |
using | TArg = SceneDrawInfo & |
![]() | |
friend | Registry |
![]() | |
static const bool | ORDERED_EXECUTION = true |
static const int32_t | ORDER_TRANSFORM = 100 |
static const int32_t | ORDER_DEVICEUPLOAD = 200 |
![]() | |
static const bool | ORDERED_EXECUTION = false |
Manages a collection of mesh instances, current and previous model matrices.
|
inline |
|
protected |
|
protected |
|
overridevirtual |
Draws the scene using the currently bound pipeline and renderpass. Vertex and Index buffers must be bound.
|
inline |
|
inline |
|
inlineoverridevirtual |
Reimplemented from foray::scene::Component::UpdateCallback.
|
inline |
|
inline |
void foray::scene::gcomp::DrawDirector::InitOrUpdate | ( | ) |
Collects mesh instances and rebuilds transform buffers.
|
overridevirtual |
Updates and uploads transform buffers.
|
protected |
|
protected |
Draw Op structs store draw operation.
|
protected |
|
protected |
|
protected |
|
protected |