Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
clustercontext.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
9
//------------------------------------------------------------------------------
10
#include "
graphics/graphicscontext.h
"
11
#include "
coregraphics/buffer.h
"
12
#include "
coregraphics/window.h
"
13
#include <array>
14
15
namespace
Clustering
16
{
17
18
class
ClusterContext
:
public
Graphics::GraphicsContext
19
{
20
__DeclarePluginContext
();
21
public
:
23
ClusterContext
();
25
virtual
~ClusterContext
();
26
28
static
void
Create
(
float
ZNear,
float
ZFar,
const
CoreGraphics::WindowId
window
);
29
31
static
const
SizeT
GetNumClusters
();
33
static
const
std::array<SizeT, 3>
GetClusterDimensions
();
34
36
static
void
UpdateResources
(
const
Graphics::FrameContext
& ctx);
37
#ifndef PUBLIC_BUILD
39
static
void
OnRenderDebug
(uint32_t flags);
40
#endif
41
43
static
void
Resize
(
const
uint
framescriptHash,
SizeT
width,
SizeT
height);
44
46
static
const
CoreGraphics::BufferId
*
GetClusterBuffer
();
47
private
:
48
50
static
void
UpdateClusters
();
51
};
52
}
// namespace Clustering
buffer.h
Clustering::ClusterContext::Resize
static void Resize(const uint framescriptHash, SizeT width, SizeT height)
Update when framescript resizes.
Definition
clustercontext.cc:197
Clustering::ClusterContext::__DeclarePluginContext
__DeclarePluginContext()
Clustering::ClusterContext::GetClusterDimensions
static const std::array< SizeT, 3 > GetClusterDimensions()
get cluster dimensions
Definition
clustercontext.cc:154
Clustering::ClusterContext::Create
static void Create(float ZNear, float ZFar, const CoreGraphics::WindowId window)
setup light context using CameraSettings
Definition
clustercontext.cc:66
Clustering::ClusterContext::UpdateResources
static void UpdateResources(const Graphics::FrameContext &ctx)
update constants
Definition
clustercontext.cc:163
Clustering::ClusterContext::~ClusterContext
virtual ~ClusterContext()
destructor
Definition
clustercontext.cc:58
Clustering::ClusterContext::OnRenderDebug
static void OnRenderDebug(uint32_t flags)
implement me
Definition
clustercontext.cc:189
Clustering::ClusterContext::ClusterContext
ClusterContext()
constructor
Definition
clustercontext.cc:51
Clustering::ClusterContext::UpdateClusters
static void UpdateClusters()
run light classification compute
Clustering::ClusterContext::GetNumClusters
static const SizeT GetNumClusters()
get number of clusters
Definition
clustercontext.cc:145
Clustering::ClusterContext::GetClusterBuffer
static const CoreGraphics::BufferId * GetClusterBuffer()
Get cluster AABB buffer.
Definition
clustercontext.cc:246
Graphics::GraphicsContext
Definition
graphicscontext.h:175
graphicscontext.h
Clustering
Context handling GPU cluster culling.
Definition
clustercontext.cc:18
Clustering::window
CoreGraphics::WindowId window
Definition
clustercontext.cc:33
CoreGraphics::BufferId
Definition
buffer.h:23
CoreGraphics::WindowId
Definition
window.h:25
Graphics::FrameContext
Definition
graphicsserver.h:31
SizeT
int SizeT
Definition
types.h:42
uint
unsigned int uint
Definition
types.h:33
window.h
code
render
clustering
clustercontext.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.