module High Level Runtime

This is the documentation for Enlighten.

module High Level Runtime

In addition to the low level API in the Enlighten library itself, the Enlighten SDK now includes a high level run time layer built on top of the low level API.

This part of Enlighten is shipped as source code. As well as being available for integration into a game engine, it serves as example usage of the Enlighten low level API. More details are available in the High Level Runtime section of the SDK documentation.

Classes

Name

Description

Name

Description

Enlighten::AsyncTaskThreadGroup

A thread group which executes Enlighten tasks by calling the AsyncTaskCallback a given number of times, and uses GeoEvent signalling to wait until all threads have completed execution.

Enlighten::BakedProbeOutputInfo

Parameters to be enqueued for a SetBakedProbeOutput() command The pointer contents will be copied; when the command has executed the original data may be released.

Enlighten::BaseAlbedoHandler

Base Albedo Handler.

Enlighten::BaseCubeMap

Base class used by the update manager to hold all of the resources for a cube map (regardless of where the solving happens).

Enlighten::BaseDynamicObject

Base class which holds everything a dynamic object must have (regardless of where the solving happens).

Enlighten::BaseEnvironment

Trivial base class used to lend a base type to environment maps.

Enlighten::BaseProbeSet

Class used by the update manager to hold all of the resources for a probe set together.

Enlighten::BaseSystem

Base class which holds everything a system must have (regardless of where the solving happens).

Enlighten::BaseSystemSolutionSpace

Base implementation of ISystemSolutionSpace.

Enlighten::BaseWorker

Base implementation of the worker class, containing functionality common to all platforms.

Enlighten::Command

Basic interface for commands to be executed on the worker thread.

Enlighten::CopyAlbedoBufferInfo

Parameters to be enqueued for a CopyInputLightingBuffer() command.

Enlighten::CopyBounceBufferInfo

Parameters to be enqueued for a CopyInputLightingBuffer() command.

Enlighten::CopyEmissiveBufferInfo

Parameters to be enqueued for a CopyInputLightingBuffer() command.

Enlighten::CopyEmissiveEnvironmentInfo

Parameters to be enqueued for the CopyEmissiveEnvironment() command.

Enlighten::CopyInputLightingBufferInfo

Parameters to be enqueued for a CopyInputLightingBuffer() command.

Enlighten::CopyProbeOutputInfo

Parameters to be enqueued for a CopyProbeOutputInfo() command.

Enlighten::CopyRawOutputInfo

Parameters to be enqueued for a CopyRawOutput() command.

Enlighten::CopyTransparencyBufferInfo

Parameters to be enqueued for a CopyMaterialTransparencyBuffer() or CopyGeometryTransparencyBuffer() command.

Enlighten::CopyVisibilityBufferInfo

Parameters to be enqueued for a CopyVisibilityBuffer() command.

Enlighten::CpuAlbedoHandler

Implementation of BaseAlbedoHandler for the CPU solver.

Enlighten::CpuCubeMap

Derived class of BaseCubeMap used by the CPU and console update managers.

Enlighten::CpuDynamicObject

Implementation of BaseDynamicObject for Cpu Solving.

Enlighten::CpuEnvironment

Class used by the CPU and console update managers to represent an environment map.

Enlighten::CpuSystem

System for the CPU solver.

Enlighten::CpuSystemSolutionSpace

System solution space for the CPU solver.

Enlighten::CpuWorker

Implementation of the worker class, containing functionality common to all platforms which solve radiosity on a CPU or SPU.

Enlighten::DefaultThreadGroup

Default implementation of IThreadGroup which executes tasks serially on the calling thread (the worker thread).

Enlighten::Dx11TextureUpdater

Implementation for managing solver output and Dx11 GPU textures.

Enlighten::DynamicObject

Class representing the local bounding box and corresponding output probe resolution of a dynamic object, so that it can be lit with volume textures of SH probe data.

Enlighten::EnlightenProfile

A container for Enlighten runtime profile statistics.

Enlighten::EnlightenTask

A task to be executed by a TaskProcessor. It consists of a task type and an object pointer.

Enlighten::FixedTimeLimiter

Simple implementation of ILimiter which prevents new tasks from starting after a fixed time has elapsed from the start of UpdateRadiosity().

Enlighten::GlTextureUpdater

Implementation for managing solver output and OpenGL GPU textures.

Enlighten::GpuTextureWrapper

Concrete implementation of IGpuTexture.

Enlighten::IAsyncTask

Async task interface.

Enlighten::IGpuTexture

IGpuTexture is the main interface used by the HLRT to keep track of output textures.

Enlighten::IGpuTextureAllocator

Interface which enables Enlighten to allocate GPU textures to hold the solved output.

Enlighten::IGpuTextureUpdater

IGpuTextureUpdater is the interface used by the HLRT to manage Enlighten solver output and associated GPU texture resources.

Enlighten::ILimiter

Interface which can prevent Enlighten tasks from starting in the current call to UpdateRadiosity.

Enlighten::ISystemSolutionSpace

A solution space for a system.

Enlighten::IThreadGroup

Interface through which MultithreadCpuWorker runs tasks on multiple threads in parallel.

Enlighten::IUpdateManager

This class is the base interface for the singleton object which manages all of the Enlighten updates for the systems and lights in the world, according to the current update strategy, solve type and albedo type.

Enlighten::IUpdateManagerWorker

Interface of the update manager worker.

Enlighten::LightMethodSelector

Light Method Selector.

Enlighten::MultithreadCpuUpdateManager

An update manager for Enlighten that does CPU updates.

Enlighten::MultithreadCpuWorker

Worker for the mulithreaded CPU update manager.

Enlighten::MultithreadCpuWorkerCommon

Implementation of the worker class, containing functionality for platforms which run tasks on a multithreaded CPU.

Enlighten::ProfileHistory

A simple class for recording a history of double valued stats.

Enlighten::RawBuffer

A range of bytes.

Enlighten::ReadInputLightingBufferInfo

Parameters to be enqueued for a ReadInputLightingBufferInfo() command.

Enlighten::RefTextureAllocator

Texture allocator for creating CPU solution spaces for Enlighten without any associated GPU resources.

Enlighten::RefTextureUpdater

Reference texture updater.

Enlighten::ReleaseSystemSolutionSpacesInfo

Parameters to be enqueued for a ReleaseSystemSolutionSpaces() command.

Enlighten::RemoveInfo

Parameters to be enqueued for a RemoveSystem(), RemoveProbeSet(), RemoveCubeMap() or RemoveDynamicObject() command.

Enlighten::SetLightBankUpdateCounterInfo

Parameters to be enqueued for a SetLightBankUpdateCounter() command.

Enlighten::SetParameterCommand

Command to set a parameter on an object.

Enlighten::SetProbeSetTransformInfo

Parameters to be enqueued for a SetProbeSetTransform() command.

Enlighten::SetSystemSolutionSpacesCommand

Command to set solutions spaces for given system.

Enlighten::SetTransparencySamplePositionOffsetInfo

Parameters to be enqueued for a SetTransparencySamplePositionOffset() command.

Enlighten::SetVisibilityBitsInfo

Parameters to be enqueued for a SetVisibilityBits() command.

Enlighten::SystemAlbedoData

Class representing the albedo data for a system (or dynamic object which contributes to radiosity).

Enlighten::TaskProcessor

TaskProcessor runs a loop for pulling tasks off the current queue until either the whole list is done, or an ILimiter tells it to stop.

Enlighten::TextureSubSection

Defines a sub-section of a texture, specified in texels.

Enlighten::TriggerVolumeTransparencyGeneric

Command to trigger a transprency volume.

Enlighten::UpdateEnvironmentInfo

Parameters to be enqueued for the UpdateEmissiveEnvironment() command.

Enlighten::UpdateLightCommandGeneric

Command to update a light.

Enlighten::UpdateLightInfo

Parameters to be enqueued for the UpdateLight() command.

Enlighten::UpdateLightOptions

Optional parameters to the UpdateLight() command.

Enlighten::UpdateManagerLight

Class which extends the Enlighten input light class with extra data used only by the high level runtime, and not by Enlighten itself.

Enlighten::UpdateManagerProperties

This class contains the properties of an Update Manager which must be supplied on creation and can't be changed.

Enlighten::UpdateManagerWorkerProperties

Class representing the global state of the update manager worker.

Enlighten::WorkerFunctionCommand

Command to execute a function in the IUpdaetManagerWorker interface with no input arguments.

Enlighten::WorkerFunctionParameterCommand

Command to execute a function in the IUpdateManagerWorker interface with one input argument.

Enlighten::WorkerFunctionTwoParametersCommand

Command to execute a function in the IUpdateManagerWorker interface with two parameters.

Enlighten::WorkerObjectFunctionCommand

Command to execute paramless method on an an object specified by the guid.

Enlighten::WorkerThreadData

Helper class for holding per-thread working data.

Enlighten::WorkspaceAllocator

A specialised circular/stack allocator hybrid for allocating solve workspace memory.

Functions

Name

Description

Name

Description

AddItem(Geo::s32, double)

Add a profile item to the history.

Clear()

Remove all objects from the update manager and free all associated memory.

ConvertToDxgiFormat(TextureFormat)

Helper function to convert from platform independent Enlighten::TextureFormat to DXGI texture format.

Copy(InputLightBase *, const UpdateManagerLight *)

Copies a light.

Copy(UpdateManagerLight *, const InputLightBase *)

Copies a light.

Create(const UpdateManagerProperties &)

Create a multithread CPU update manager.

CyclesToMillisecond(Geo::s64)

Helper function to convert CPU cycles to milliseconds.

CyclesToSeconds(Geo::s64)

Helper function to convert CPU cycles to seconds.

EnqueueCommand(IUpdateManager *, CommandType &&)

Enqueues a command.

EnqueueCommand(CommandType &&)

Enqueues a command for later execution by the worker thread, if it is running.

EnqueueSetObjectParameter(IUpdateManager *, Geo::GeoGuid, void(ObjectType::*)(ParamType), ArgType &&)

Enqueues a command to set a parameter on an object on the worker thread.

EnqueueSetObjectParameter(IUpdateManager *, ObjectType *, void(ObjectType::*)(const ParamType &), ArgType &&)

Enqueues a command to set a parameter on an object on the worker thread.

EnqueueSetObjectParameter(IUpdateManager *, Geo::GeoGuid, void(ObjectType::*)(const ParamType &), ArgType &&)

Enqueues a command to set a parameter on an object on the worker thread.

EnqueueSetObjectParameter(IUpdateManager *, ObjectType *, void(ObjectType::*)(ParamType), ArgType &&)

Enqueues a command to set a parameter on an object on the worker thread.

FindObject(const Geo::GeoGuid &, BaseSystem *&)

Finds the object with the given GUID.

FindObject(const Geo::GeoGuid &, BaseProbeSet *&)

Finds the object with the given GUID.

FindObject(const Geo::GeoGuid &, BaseCubeMap *&)

Finds the object with the given GUID.

FindObject(const Geo::GeoGuid &, BaseDynamicObject *&)

Finds the object with the given GUID.

FindObject(const Geo::GeoGuid &, CpuSystem *&)

Specialise the BaseWorker::FindObject to deal with a concrete type here.

GetDxgiFormatBytesPerPixel(DXGI_FORMAT)

Helper function to calculate the number of texture bytes per pixel for DXGI texture formats supported by Enlighten.

GetItem(Geo::s32)

Get the last added profile item.

GetItemAverage(Geo::s32)

Get the average of the profile items in the history.

GetItemCount(Geo::s32)

Get the number of profile items in the history.

GetItemMaximum(Geo::s32)

Get the max value of the profile items in the history.

GetItemMinimum(Geo::s32)

Get the min value of the profile items in the history.

GetOutputTextureRangeEnd(const RadSystemCore &, SolveType)

Return the end of the range of output texture types that can be updated for this combination of solve type and radiosity core.

GetTextureBytesPerPixel(TextureFormat)

Gets the number of bytes required for each pixel of the given texture format.

MultithreadCpuUpdateManager(const UpdateManagerProperties &)

Protected constructor. Do not call directly, use Create instead.

ProfileHistory(const Geo::GeoGuid &)

Construct a history from a guid.

Reset()

Reset to empty (clear all history)

SetWorkerProperties(const UpdateManagerWorkerProperties &)

Set the worker global state.

UpdateRadiosity(const Geo::v128 &)

The main radiosity update function.

Enums

Name

Description

Name

Description

AggregateProfileItem

Items we record for totals.

CubeMapProfileItem

Items we record against cube maps.

EnlightenTaskType

The MultithreadCpuWorker works by putting tasks in a list, and then executing TaskProcessors on several threads in parallel.

OutputTextureType

Enumeration of the different output textures produced by the Enlighten solvers.

ProbeSetProfileItem

Items we record against probe sets.

ProbeVolumeOutputTextureType

Enumeration of the different probe volume output textures.

SolveType

Enumeration of the different types of solve.

SystemProfileItem

Items we record against systems.

TextureFormat

Enumeration of output texture formats used by the high level run-time.

Typedefs

Name

Description

Name

Description

void(GEO_CALL * AsyncTaskCallback)(IAsyncTask *Task, const char *Name)

Function pointer type for the callback for executing tasks asynchronously.

void(* CommandCompletedCallback)(void *)

Callback signature for when a command is completed.

ProfileHistory< NUM_AGGREGATE_PROFILE_ITEMS > EnlightenAggregateProfile

History profile for aggregate stats.

ProfileHistory< NUM_CUBE_MAP_PROFILE_ITEMS > EnlightenCubeMapProfile

History profile for cube maps.

ProfileHistory< NUM_PROBE_SET_PROFILE_ITEMS > EnlightenProbeSetProfile

History profile for probesets.

ProfileHistory< NUM_SYSTEM_PROFILE_ITEMS > EnlightenSystemProfile

History profile for systems.

Geo::GeoString< char > ProfileDescription

String for describing a profile, used by EnlightenProfile.

Geo::GeoMap< Geo::GeoGuid, Geo::s32 > TGuidIndexMap

GeoGuid-to-s32 map used by EnlightenProfile.

Variables

Name

Name