Nebula
Loading...
Searching...
No Matches
Visibility::ObserverContext Class Reference

#include <visibilitycontext.h>

Inherits Graphics::GraphicsContext.

Classes

struct  VisibilityBatchCommand
 
struct  VisibilityDrawCommand
 
struct  VisibilityDrawList
 
struct  VisibilityModelCommand
 

Public Types

typedef Ids::Id32 ModelAllocId
 

Static Public Member Functions

static void Setup (const Graphics::GraphicsEntityId id, VisibilityEntityType entityType, bool isOrtho=false)
 setup entity
 
static void MakeDependency (const Graphics::GraphicsEntityId a, const Graphics::GraphicsEntityId b, const DependencyMode mode)
 setup a dependency between observers
 
static void RunVisibilityTests (const Graphics::FrameContext &ctx)
 run visibility testing
 
static void GenerateDrawLists (const Graphics::FrameContext &ctx)
 runs before frame is updated
 
static void Create ()
 create context
 
static void Discard ()
 discard context
 
static VisibilitySystemCreateBoxSystem (const BoxSystemLoadInfo &info)
 create a box system
 
static VisibilitySystemCreatePortalSystem (const PortalSystemLoadInfo &info)
 create a portal system
 
static VisibilitySystemCreateOctreeSystem (const OctreeSystemLoadInfo &info)
 create octree system
 
static VisibilitySystemCreateQuadtreeSystem (const QuadtreeSystemLoadInfo &info)
 create quadtree system
 
static VisibilitySystemCreateBruteforceSystem (const BruteforceSystemLoadInfo &info)
 create brute force system
 
static void WaitForVisibility (const Graphics::FrameContext &ctx)
 wait for all visibility jobs
 
static void OnRenderDebug (uint32_t flags)
 render debug
 
static const VisibilityDrawListGetVisibilityDrawList (const Graphics::GraphicsEntityId id)
 get visibility draw list
 

Static Public Attributes

static Jobs::JobSyncId jobInternalSync
 
static Jobs::JobSyncId jobInternalSync2
 
static Jobs::JobSyncId jobInternalSync3
 
static Jobs::JobSyncId jobHostSync
 
static Util::Queue< Jobs::JobIdrunningJobs
 

Private Types

typedef Util::Array< Math::ClipStatus::TypeVisibilityResultArray
 
typedef Ids::IdAllocator< Math::mat4, bool, Graphics::GraphicsEntityId, VisibilityEntityType, VisibilityResultArray, Graphics::GraphicsEntityId, DependencyMode, VisibilityDrawList, Memory::ArenaAllocator< 1024 > > ObserverAllocator
 

Private Member Functions

 __DeclareContext ()
 

Static Private Member Functions

static Graphics::ContextEntityId Alloc ()
 allocate a new slice for this context
 
static void Dealloc (Graphics::ContextEntityId id)
 deallocate a slice
 

Static Private Attributes

static ObserverAllocator observerAllocator
 
static Util::Array< VisibilitySystem * > systems
 keep as ordinary array of pointers, no need to have them cache aligned
 

Friends

class ObservableContext
 

Additional Inherited Members

- Public Member Functions inherited from Graphics::GraphicsContext
 GraphicsContext ()
 constructor
 
virtual ~GraphicsContext ()
 destructor
 
- Static Protected Member Functions inherited from Graphics::GraphicsContext
static void InternalRegisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state)
 
static void InternalDeregisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state)
 
template<class ID_ALLOCATOR >
static void InternalDefragment (ID_ALLOCATOR &allocator, Graphics::GraphicsContextState &&state)
 

Member Typedef Documentation

◆ ModelAllocId

◆ ObserverAllocator

◆ VisibilityResultArray

Member Function Documentation

◆ __DeclareContext()

Visibility::ObserverContext::__DeclareContext ( )
private

◆ Alloc()

Graphics::ContextEntityId Visibility::ObserverContext::Alloc ( )
staticprivate

allocate a new slice for this context

◆ Create()

void Visibility::ObserverContext::Create ( )
static

create context

◆ CreateBoxSystem()

VisibilitySystem * Visibility::ObserverContext::CreateBoxSystem ( const BoxSystemLoadInfo & info)
static

create a box system

◆ CreateBruteforceSystem()

VisibilitySystem * Visibility::ObserverContext::CreateBruteforceSystem ( const BruteforceSystemLoadInfo & info)
static

create brute force system

◆ CreateOctreeSystem()

VisibilitySystem * Visibility::ObserverContext::CreateOctreeSystem ( const OctreeSystemLoadInfo & info)
static

create octree system

◆ CreatePortalSystem()

VisibilitySystem * Visibility::ObserverContext::CreatePortalSystem ( const PortalSystemLoadInfo & info)
static

create a portal system

◆ CreateQuadtreeSystem()

VisibilitySystem * Visibility::ObserverContext::CreateQuadtreeSystem ( const QuadtreeSystemLoadInfo & info)
static

create quadtree system

◆ Dealloc()

void Visibility::ObserverContext::Dealloc ( Graphics::ContextEntityId id)
staticprivate

deallocate a slice

◆ Discard()

void Visibility::ObserverContext::Discard ( )
static

discard context

◆ GenerateDrawLists()

void Visibility::ObserverContext::GenerateDrawLists ( const Graphics::FrameContext & ctx)
static

runs before frame is updated

◆ GetVisibilityDrawList()

const ObserverContext::VisibilityDrawList * Visibility::ObserverContext::GetVisibilityDrawList ( const Graphics::GraphicsEntityId id)
static

get visibility draw list

◆ MakeDependency()

void Visibility::ObserverContext::MakeDependency ( const Graphics::GraphicsEntityId a,
const Graphics::GraphicsEntityId b,
const DependencyMode mode )
static

setup a dependency between observers

◆ OnRenderDebug()

void Visibility::ObserverContext::OnRenderDebug ( uint32_t flags)
static

render debug

◆ RunVisibilityTests()

void Visibility::ObserverContext::RunVisibilityTests ( const Graphics::FrameContext & ctx)
static

run visibility testing

◆ Setup()

void Visibility::ObserverContext::Setup ( const Graphics::GraphicsEntityId id,
VisibilityEntityType entityType,
bool isOrtho = false )
static

setup entity

◆ WaitForVisibility()

void Visibility::ObserverContext::WaitForVisibility ( const Graphics::FrameContext & ctx)
static

wait for all visibility jobs

Friends And Related Symbol Documentation

◆ ObservableContext

friend class ObservableContext
friend

Member Data Documentation

◆ jobHostSync

Jobs::JobSyncId Visibility::ObserverContext::jobHostSync
static

◆ jobInternalSync

Jobs::JobSyncId Visibility::ObserverContext::jobInternalSync
static

◆ jobInternalSync2

Jobs::JobSyncId Visibility::ObserverContext::jobInternalSync2
static

◆ jobInternalSync3

Jobs::JobSyncId Visibility::ObserverContext::jobInternalSync3
static

◆ observerAllocator

ObserverContext::ObserverAllocator Visibility::ObserverContext::observerAllocator
staticprivate

◆ runningJobs

Util::Queue<Jobs::JobId> Visibility::ObserverContext::runningJobs
static

◆ systems

Util::Array< VisibilitySystem * > Visibility::ObserverContext::systems
staticprivate

keep as ordinary array of pointers, no need to have them cache aligned


The documentation for this class was generated from the following files: