Nebula
Loading...
Searching...
No Matches
Vegetation::VegetationContext Class Reference

#include <vegetationcontext.h>

Inherits Graphics::GraphicsContext.

Classes

struct  VegetationInstanceInfo

Public Member Functions

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

Static Public Member Functions

static void Create ()
 create vegetation context
static void Discard ()
 discard vegetation context
static void Setup (const Graphics::GraphicsEntityId id)
 Setup vegetation context.
static uint SetupMesh (const Graphics::GraphicsEntityId id, const VegetationMeshSetup &setup)
 Setup a new mesh.
static void Invalidate (const Graphics::GraphicsEntityId id)
 Invalidate terrain related resources.
static void ClearMeshes (const Graphics::GraphicsEntityId id)
 forget the meshes, SetupMesh starts at index 0 again. What an editor does to set the plants up anew
static void UpdateViewResources (const Graphics::ViewId view, const Graphics::FrameContext &ctx)
 update resources

Private Types

enum  LoadedBits { Model , Material }
enum  { Vegetation_InstanceInfo , Vegetation_SlopeThreshold , Vegetation_HeightThreshold }
typedef Ids::IdAllocator< VegetationInstanceInfo, float, float > VegetationAllocator

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 VegetationAllocator vegetationAllocator

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

◆ VegetationAllocator

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
Vegetation_InstanceInfo 
Vegetation_SlopeThreshold 
Vegetation_HeightThreshold 

◆ LoadedBits

Enumerator
Model 
Material 

Constructor & Destructor Documentation

◆ VegetationContext()

Vegetation::VegetationContext::VegetationContext ( )

constructor

◆ ~VegetationContext()

Vegetation::VegetationContext::~VegetationContext ( )

destructor

Member Function Documentation

◆ __DeclareContext()

Vegetation::VegetationContext::__DeclareContext ( )
private

◆ Alloc()

Graphics::ContextEntityId Vegetation::VegetationContext::Alloc ( )
staticprivate

allocate a new slice for this context

◆ ClearMeshes()

void Vegetation::VegetationContext::ClearMeshes ( const Graphics::GraphicsEntityId id)
static

forget the meshes, SetupMesh starts at index 0 again. What an editor does to set the plants up anew

The buffers stay, they are the instance's and not a mesh's.

◆ Create()

void Vegetation::VegetationContext::Create ( )
static

create vegetation context

◆ Dealloc()

void Vegetation::VegetationContext::Dealloc ( Graphics::ContextEntityId id)
staticprivate

deallocate a slice

◆ Discard()

void Vegetation::VegetationContext::Discard ( )
static

discard vegetation context

◆ Invalidate()

void Vegetation::VegetationContext::Invalidate ( const Graphics::GraphicsEntityId id)
static

Invalidate terrain related resources.

◆ Setup()

void Vegetation::VegetationContext::Setup ( const Graphics::GraphicsEntityId id)
static

Setup vegetation context.

◆ SetupMesh()

uint Vegetation::VegetationContext::SetupMesh ( const Graphics::GraphicsEntityId id,
const VegetationMeshSetup & setup )
static

Setup a new mesh.

◆ UpdateViewResources()

void Vegetation::VegetationContext::UpdateViewResources ( const Graphics::ViewId view,
const Graphics::FrameContext & ctx )
static

update resources

Member Data Documentation

◆ vegetationAllocator

VegetationContext::VegetationAllocator Vegetation::VegetationContext::vegetationAllocator
staticprivate

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