Nebula
Loading...
Searching...
No Matches
Raytracing::RaytracingContext Class Reference

#include <raytracingcontext.h>

Inherits Graphics::GraphicsContext.

Public Member Functions

 RaytracingContext ()
 constructor
 
 ~RaytracingContext ()
 destructor
 
- Public Member Functions inherited from Graphics::GraphicsContext
 GraphicsContext ()
 constructor
 
virtual ~GraphicsContext ()
 destructor
 

Static Public Member Functions

static void Create (const RaytracingSetupSettings &settings)
 Setup ray tracing context.
 
static void SetupModel (const Graphics::GraphicsEntityId id, CoreGraphics::BlasInstanceFlags flags, uchar mask)
 Setup a model entity for ray tracing, assumes model context registration.
 
static void SetupMesh (const Graphics::GraphicsEntityId id, const UpdateType objectType, const CoreGraphics::VertexComponent::Format format, const CoreGraphics::IndexType::Code indexType, const CoreGraphics::VertexAlloc &vertices, const CoreGraphics::VertexAlloc &indices, const CoreGraphics::PrimitiveGroup &patchPrimGroup, const SizeT vertexOffsetStride, const SizeT patchVertexStride, const Util::Array< Math::mat4 > transforms, const uint materialTableOffset, const MaterialTemplates::MaterialProperties shader, const CoreGraphics::VertexLayoutType vertexLayout)
 Setup a terrain system for ray tracing.
 
static void InvalidateBLAS (const Graphics::GraphicsEntityId id)
 Invalidate a BLAS (for example, when the mesh has morphed) associated with a graphics entity.
 
static void ReconstructTopLevelAcceleration (const Graphics::FrameContext &ctx)
 Build top level acceleration.
 
static void UpdateTransforms (const Graphics::FrameContext &ctx)
 Update transforms.
 
static void WaitForJobs (const Graphics::FrameContext &ctx)
 Wait for jobs to finish.
 
static void UpdateViewResources (const Ptr< Graphics::View > &view, const Graphics::FrameContext &ctx)
 Update view constants.
 
static void OnRenderDebug (uint32_t flags)
 debug rendering
 

Private Types

enum  { Raytracing_Allocation , Raytracing_UpdateType , Raytracing_NumStructures , Raytracing_Blases }
 
typedef Ids::IdAllocator< Memory::RangeAllocation, Raytracing::UpdateType, uint, Util::FixedArray< CoreGraphics::BlasId > > RaytracingAllocator
 

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 RaytracingAllocator raytracingContextAllocator
 

Additional Inherited Members

- 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

◆ RaytracingAllocator

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
Raytracing_Allocation 
Raytracing_UpdateType 
Raytracing_NumStructures 
Raytracing_Blases 

Constructor & Destructor Documentation

◆ RaytracingContext()

Raytracing::RaytracingContext::RaytracingContext ( )

constructor

◆ ~RaytracingContext()

Raytracing::RaytracingContext::~RaytracingContext ( )

destructor

Member Function Documentation

◆ __DeclareContext()

Raytracing::RaytracingContext::__DeclareContext ( )
private

◆ Alloc()

Graphics::ContextEntityId Raytracing::RaytracingContext::Alloc ( )
inlinestaticprivate

allocate a new slice for this context

◆ Create()

void Raytracing::RaytracingContext::Create ( const RaytracingSetupSettings & settings)
static

Setup ray tracing context.

◆ Dealloc()

void Raytracing::RaytracingContext::Dealloc ( Graphics::ContextEntityId id)
staticprivate

deallocate a slice

◆ InvalidateBLAS()

void Raytracing::RaytracingContext::InvalidateBLAS ( const Graphics::GraphicsEntityId id)
static

Invalidate a BLAS (for example, when the mesh has morphed) associated with a graphics entity.

◆ OnRenderDebug()

void Raytracing::RaytracingContext::OnRenderDebug ( uint32_t flags)
static

debug rendering

◆ ReconstructTopLevelAcceleration()

void Raytracing::RaytracingContext::ReconstructTopLevelAcceleration ( const Graphics::FrameContext & ctx)
static

Build top level acceleration.

◆ SetupMesh()

void Raytracing::RaytracingContext::SetupMesh ( const Graphics::GraphicsEntityId id,
const UpdateType objectType,
const CoreGraphics::VertexComponent::Format format,
const CoreGraphics::IndexType::Code indexType,
const CoreGraphics::VertexAlloc & vertices,
const CoreGraphics::VertexAlloc & indices,
const CoreGraphics::PrimitiveGroup & patchPrimGroup,
const SizeT vertexOffsetStride,
const SizeT patchVertexStride,
const Util::Array< Math::mat4 > transforms,
const uint materialTableOffset,
const MaterialTemplates::MaterialProperties shader,
const CoreGraphics::VertexLayoutType vertexLayout )
static

Setup a terrain system for ray tracing.

◆ SetupModel()

void Raytracing::RaytracingContext::SetupModel ( const Graphics::GraphicsEntityId id,
CoreGraphics::BlasInstanceFlags flags,
uchar mask )
static

Setup a model entity for ray tracing, assumes model context registration.

◆ UpdateTransforms()

void Raytracing::RaytracingContext::UpdateTransforms ( const Graphics::FrameContext & ctx)
static

Update transforms.

◆ UpdateViewResources()

void Raytracing::RaytracingContext::UpdateViewResources ( const Ptr< Graphics::View > & view,
const Graphics::FrameContext & ctx )
static

Update view constants.

◆ WaitForJobs()

void Raytracing::RaytracingContext::WaitForJobs ( const Graphics::FrameContext & ctx)
static

Wait for jobs to finish.

Member Data Documentation

◆ raytracingContextAllocator

RaytracingContext::RaytracingAllocator Raytracing::RaytracingContext::raytracingContextAllocator
staticprivate

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