CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::RendererSkyboxEnvironment Class Reference

The implementation for skybox environment type. More...

#include <CeresEngine/Renderer/RendererEnvironment.hpp>

Inheritance diagram for CeresEngine::RendererSkyboxEnvironment:
CeresEngine::RendererEnvironment CeresEngine::TRendererSceneObject< RendererEnvironment > CeresEngine::TRendererObject< SelfType, BaseType > CeresEngine::RendererObject

Public Member Functions

 RendererSkyboxEnvironment (RendererEnvironmentManager &manager, RendererScene &scene)
 Creates a new RendererSkyboxEnvironment.
 
 ~RendererSkyboxEnvironment () override
 Destroys the renderer environment and releases any renderer (and RenderAPI)-related resources.
 
void prepare (RendererContext &context) override
 Prepares the environment for the rendering of the current frame.
 
RendererEnvironmentType getType () const noexcept final
 Determines the type of environment.
 
const GPUUniformBuffergetUniformBuffer () const final
 The uniform buffer storing the environment GPU parameters used by the renderer.
 
const RendererTexturePtrgetSkyboxTexture () const noexcept
 A texture that represents the scene sky.
 
const RendererTexturePtrgetIrradianceMap () const noexcept
 The (diffuse) irradiance map for the skybox texture.
 
const RendererTexturePtrgetRadianceMap () const noexcept
 The (specular) radiance map for the skybox texture.
 
- Public Member Functions inherited from CeresEngine::RendererEnvironment
 RendererEnvironment (RendererEnvironmentManager &manager, RendererScene &scene)
 Creates a new RendererEnvironment.
 
virtual ~RendererEnvironment ()
 Destroys the renderer environment and releases any renderer (and RenderAPI)-related resources.
 
void synchronize (const EnvironmentComponent &component)
 Update the renderer environment with data from a transform and the component.
 
const RendererEnvironmentDirtyFlagsgetDirtyFlags () const noexcept
 A set of flags that represent the dirty portions of the object.
 
bool isDirty () const noexcept
 
void markAsDirty (const RendererEnvironmentDirtyFlags &flags=RendererEnvironmentDirtyFlag::All) noexcept
 
- Public Member Functions inherited from CeresEngine::TRendererSceneObject< RendererEnvironment >
 TRendererSceneObject (Args &&... args)
 Creates a new TRendererSceneObject instance.
 
 ~TRendererSceneObject () noexcept override
 Destroys an existing TRendererSceneObject instance.
 
- Public Member Functions inherited from CeresEngine::TRendererObject< SelfType, BaseType >
template<typename... Args>
 TRendererObject (ManagerType &manager, Args &&... args)
 Creates a new TRendererObject instance.
 
void destroy () noexcept override
 Destroys the RendererObject.
 
ManagerTypegetManager () const noexcept
 The owning object manager.
 
- Public Member Functions inherited from CeresEngine::RendererObject
 RendererObject ()=default
 Creates a new RendererObject instance.
 
virtual ~RendererObject () noexcept=default
 Destroys an existing RendererObject instance.
 
RendererObjectID getID () const noexcept
 An identifier that uniquely identifies this object in the renderer.
 

Private Types

using super = RendererEnvironment
 

Private Attributes

RendererTexturePtr mOriginalSkyboxTexture
 
RendererTexturePtr mSkyboxTexture
 A texture that represents the scene sky.
 
RendererTexturePtr mIrradianceMap
 The (diffuse) irradiance map for the skybox texture.
 
RendererTexturePtr mRadianceMap
 The (specular) radiance map for the skybox texture.
 
GPUDynamicUniformBuffer< RendererSkyboxEnvironmentParamsmUniformBuffer
 The uniform buffer storing the environment GPU parameters used by the renderer.
 

Friends

class RendererEnvironmentManager
 

Additional Inherited Members

- Public Attributes inherited from CeresEngine::RendererObject
Event< void(RendererObjectID newID)> willChangeID
 An event called whenever the object is about to change it's ID.
 
Event< void(RendererObjectID oldID)> didChangeID
 An event called whenever the object changes it's ID.
 
- Protected Member Functions inherited from CeresEngine::RendererEnvironment
GPUImagePtr equirectangularToCubeMap (RendererContext &context, const GPUImagePtr &environmentMap)
 
GPUImagePtr prefilterIrradianceMap (RendererContext &context, const GPUImagePtr &environmentMap)
 Generates a diffuse irradiance map for the given environmentMap.
 
GPUImagePtr prefilterRadianceMap (RendererContext &context, const GPUImagePtr &environmentMap)
 Generates a specular pre-filtered reflection map using environmentMap as a base.
 
- Protected Attributes inherited from CeresEngine::RendererEnvironment
EnvironmentComponent mComponent
 A copy of the latest environment component.
 
RendererEnvironmentDirtyFlags mDirtyFlags = RendererEnvironmentDirtyFlag::All
 A set of flags that represent the dirty portions of the object.
 
- Protected Attributes inherited from CeresEngine::TRendererObject< SelfType, BaseType >
ManagerTypemManager
 The owning object manager.
 
- Protected Attributes inherited from CeresEngine::RendererObject
RendererObjectID mID
 An identifier that uniquely identifies this object in the renderer.
 

Detailed Description

The implementation for skybox environment type.

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ RendererSkyboxEnvironment()

CeresEngine::RendererSkyboxEnvironment::RendererSkyboxEnvironment ( RendererEnvironmentManager manager,
RendererScene scene 
)
explicit

Creates a new RendererSkyboxEnvironment.

Parameters
managerThe owning manager.
sceneA reference to the owning scene.

◆ ~RendererSkyboxEnvironment()

CeresEngine::RendererSkyboxEnvironment::~RendererSkyboxEnvironment ( )
override

Destroys the renderer environment and releases any renderer (and RenderAPI)-related resources.

Member Function Documentation

◆ getIrradianceMap()

const RendererTexturePtr & CeresEngine::RendererSkyboxEnvironment::getIrradianceMap ( ) const
inlinenoexcept

The (diffuse) irradiance map for the skybox texture.

◆ getRadianceMap()

const RendererTexturePtr & CeresEngine::RendererSkyboxEnvironment::getRadianceMap ( ) const
inlinenoexcept

The (specular) radiance map for the skybox texture.

◆ getSkyboxTexture()

const RendererTexturePtr & CeresEngine::RendererSkyboxEnvironment::getSkyboxTexture ( ) const
inlinenoexcept

A texture that represents the scene sky.

Can be null if the sky texture is not set, in that case no sky is present on the scene.

◆ getType()

RendererEnvironmentType CeresEngine::RendererSkyboxEnvironment::getType ( ) const
inlinefinalvirtualnoexcept

Determines the type of environment.

Implements CeresEngine::RendererEnvironment.

◆ getUniformBuffer()

const GPUUniformBuffer & CeresEngine::RendererSkyboxEnvironment::getUniformBuffer ( ) const
inlinefinalvirtual

The uniform buffer storing the environment GPU parameters used by the renderer.

Implements CeresEngine::RendererEnvironment.

◆ prepare()

void CeresEngine::RendererSkyboxEnvironment::prepare ( RendererContext context)
overridevirtual

Prepares the environment for the rendering of the current frame.

This will update uniform buffers and perform any other necessary operations necessary for rendering.

Parameters
contextA context struct that contains parameters given by the renderer.

Reimplemented from CeresEngine::RendererEnvironment.

Friends And Related Symbol Documentation

◆ RendererEnvironmentManager

Member Data Documentation

◆ mIrradianceMap

RendererTexturePtr CeresEngine::RendererSkyboxEnvironment::mIrradianceMap
private

The (diffuse) irradiance map for the skybox texture.

◆ mOriginalSkyboxTexture

RendererTexturePtr CeresEngine::RendererSkyboxEnvironment::mOriginalSkyboxTexture
private

◆ mRadianceMap

RendererTexturePtr CeresEngine::RendererSkyboxEnvironment::mRadianceMap
private

The (specular) radiance map for the skybox texture.

◆ mSkyboxTexture

RendererTexturePtr CeresEngine::RendererSkyboxEnvironment::mSkyboxTexture
private

A texture that represents the scene sky.

Can be null if the sky texture is not set, in that case no sky is present on the scene.

◆ mUniformBuffer

GPUDynamicUniformBuffer<RendererSkyboxEnvironmentParams> CeresEngine::RendererSkyboxEnvironment::mUniformBuffer
private

The uniform buffer storing the environment GPU parameters used by the renderer.


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