OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::ParallaxCorrectedCubemapBase Class Referenceabstract

#include <OgreParallaxCorrectedCubemapBase.h>

+ Inheritance diagram for Ogre::ParallaxCorrectedCubemapBase:

Public Member Functions

 ParallaxCorrectedCubemapBase (IdType id, Root *root, SceneManager *sceneManager, const CompositorWorkspaceDef *probeWorkspaceDef, bool automaticMode)
 
virtual ~ParallaxCorrectedCubemapBase ()
 
virtual TextureGpu_acquireTextureSlot (uint16 &outTexSlot)
 Acquires a texture with a given slot. More...
 
virtual void _addManuallyActiveProbe (CubemapProbe *probe)
 
virtual void _copyRenderTargetToCubemap (uint32 cubemapArrayIdx)
 
virtual void _notifyPreparePassHash (const Matrix4 &viewMatrix)
 
virtual void _releaseManualHardwareResources ()
 
virtual void _releaseTextureSlot (TextureGpu *texture, uint32 texSlot)
 
virtual void _removeManuallyActiveProbe (CubemapProbe *probe)
 
virtual void _restoreManualHardwareResources ()
 
void _setIsRendering (bool bIsRendering)
 
void _setProbeRenderInProgress (CubemapProbe *probe)
 
virtual void allWorkspacesBeforeBeginUpdate ()
 Called from CompositorManager2 (not CompositorWorkspace) when we're about to begin updating all the workspaces. More...
 
virtual void allWorkspacesBeginUpdate ()
 Called from CompositorManager2 (not CompositorWorkspace) when we're about to update all the workspaces (it's safe to update your own workspaces without calling _beginUpdate and _endUpdate) Warning: Don't add/remove listeners to CompositorManager2 inside this function. More...
 
CubemapProbecreateProbe ()
 Adds a cubemap probe. More...
 
virtual void destroyAllProbes ()
 
virtual void destroyProbe (CubemapProbe *probe)
 
virtual void eventOccurred (const String &eventName, const NameValuePairList *parameters)
 A rendersystem-specific event occurred. More...
 
virtual void fillConstBufferData (const Matrix4 &viewMatrix, float *RESTRICT_ALIAS passBufferPtr) const
 
virtual TextureGpufindIbl (const TextureGpu *baseParams)
 
virtual TextureGpufindTmpRtt (const TextureGpu *baseParams)
 See mTmpRtt. More...
 
bool getAutomaticMode () const
 
TextureGpugetBindTexture () const
 
const HlmsSamplerblockgetBindTrilinearSamplerblock ()
 
virtual size_t getConstBufferSize ()
 
const CompositorWorkspaceDefgetDefaultWorkspaceDef () const
 
uint32 getIblTargetTextureFlags (PixelFormatGpu pixelFormat) const
 
IdType getId () const
 Get the unique id of this object. More...
 
const CubemapProbeVecgetProbes () const
 
SceneManagergetSceneManager () const
 
bool getUseDpm2DArray () const
 
bool isRendering () const
 Inform whether we're currently updating a probe. More...
 
bool operator() (const IdObject &left, const IdObject &right)
 
bool operator() (const IdObject *left, const IdObject *right)
 
virtual void passEarlyPreExecute (CompositorPass *pass)
 Called early on in pass' execution. More...
 
virtual void passPosExecute (CompositorPass *pass)
 Called after a pass has been executed. More...
 
virtual void passPreExecute (CompositorPass *pass)
 Called when each pass is about to be executed. More...
 
virtual void passSceneAfterFrustumCulling (CompositorPassScene *pass)
 Called after a pass scene has performed frustum caulling but has yet to prepare and execute rendering commands. More...
 
virtual void passSceneAfterShadowMaps (CompositorPassScene *pass)
 Called after a pass scene has rendered shadow casting (it gets called even if there is no shadow node). More...
 
virtual void prepareForClearScene ()
 Destroys the Proxy Items. More...
 
virtual void releaseIbl (const TextureGpu *tmpRtt)
 
virtual void releaseTmpRtt (const TextureGpu *tmpRtt)
 
virtual void restoreFromClearScene ()
 
virtual void updateAllDirtyProbes ()=0
 By default the probes will be constructed when the user enters its vecinity. More...
 
virtual void workspacePosUpdate (CompositorWorkspace *workspace)
 Called after all nodes has been updated. More...
 
virtual void workspacePreUpdate (CompositorWorkspace *workspace)
 Called before all nodes are going to be updated. More...
 

Static Public Member Functions

static void fillConstBufferData (const CubemapProbe &probe, const Matrix4 &viewMatrix, const Matrix3 &invViewMat3, float *RESTRICT_ALIAS passBufferPtr)
 
static uint8 getIblNumMipmaps (uint32 width, uint32 height)
 

Public Attributes

uint32 mMask
 
bool mPaused
 

Detailed Description

Constructor & Destructor Documentation

◆ ParallaxCorrectedCubemapBase()

Ogre::ParallaxCorrectedCubemapBase::ParallaxCorrectedCubemapBase ( IdType  id,
Root root,
SceneManager sceneManager,
const CompositorWorkspaceDef probeWorkspaceDef,
bool  automaticMode 
)

◆ ~ParallaxCorrectedCubemapBase()

virtual Ogre::ParallaxCorrectedCubemapBase::~ParallaxCorrectedCubemapBase ( )
virtual

Member Function Documentation

◆ _acquireTextureSlot()

virtual TextureGpu* Ogre::ParallaxCorrectedCubemapBase::_acquireTextureSlot ( uint16 outTexSlot)
virtual

Acquires a texture with a given slot.

Parameters
outTexSlot[out] Texture slot. Value is left untouched if return value is nullptr
Returns
Texture. Can be nullptr if ran out of slots.

Reimplemented in Ogre::ParallaxCorrectedCubemapAuto.

◆ _addManuallyActiveProbe()

virtual void Ogre::ParallaxCorrectedCubemapBase::_addManuallyActiveProbe ( CubemapProbe probe)
virtual

Reimplemented in Ogre::ParallaxCorrectedCubemap.

◆ _copyRenderTargetToCubemap()

virtual void Ogre::ParallaxCorrectedCubemapBase::_copyRenderTargetToCubemap ( uint32  cubemapArrayIdx)
virtual

◆ _notifyPreparePassHash()

virtual void Ogre::ParallaxCorrectedCubemapBase::_notifyPreparePassHash ( const Matrix4 viewMatrix)
virtual

Reimplemented in Ogre::ParallaxCorrectedCubemap.

◆ _releaseManualHardwareResources()

virtual void Ogre::ParallaxCorrectedCubemapBase::_releaseManualHardwareResources ( )
virtual

Reimplemented in Ogre::ParallaxCorrectedCubemap.

◆ _releaseTextureSlot()

virtual void Ogre::ParallaxCorrectedCubemapBase::_releaseTextureSlot ( TextureGpu texture,
uint32  texSlot 
)
virtual

◆ _removeManuallyActiveProbe()

virtual void Ogre::ParallaxCorrectedCubemapBase::_removeManuallyActiveProbe ( CubemapProbe probe)
virtual

Reimplemented in Ogre::ParallaxCorrectedCubemap.

◆ _restoreManualHardwareResources()

virtual void Ogre::ParallaxCorrectedCubemapBase::_restoreManualHardwareResources ( )
virtual

Reimplemented in Ogre::ParallaxCorrectedCubemap.

◆ _setIsRendering()

void Ogre::ParallaxCorrectedCubemapBase::_setIsRendering ( bool  bIsRendering)
inline

◆ _setProbeRenderInProgress()

void Ogre::ParallaxCorrectedCubemapBase::_setProbeRenderInProgress ( CubemapProbe probe)
inline

◆ allWorkspacesBeforeBeginUpdate()

virtual void Ogre::CompositorWorkspaceListener::allWorkspacesBeforeBeginUpdate ( )
inlinevirtualinherited

Called from CompositorManager2 (not CompositorWorkspace) when we're about to begin updating all the workspaces.

You'll have to manage the RenderSystem and SceneManager to call the adequate begin/end calls Warning: Don't add/remove listeners to CompositorManager2 inside this function.

Reimplemented in Ogre::VctCascadedVoxelizer, Ogre::ParallaxCorrectedCubemapAuto, and Ogre::ParallaxCorrectedCubemap.

◆ allWorkspacesBeginUpdate()

virtual void Ogre::CompositorWorkspaceListener::allWorkspacesBeginUpdate ( )
inlinevirtualinherited

Called from CompositorManager2 (not CompositorWorkspace) when we're about to update all the workspaces (it's safe to update your own workspaces without calling _beginUpdate and _endUpdate) Warning: Don't add/remove listeners to CompositorManager2 inside this function.

Reimplemented in Ogre::ParallaxCorrectedCubemapAuto, and Ogre::ParallaxCorrectedCubemap.

◆ createProbe()

CubemapProbe* Ogre::ParallaxCorrectedCubemapBase::createProbe ( )

Adds a cubemap probe.

◆ destroyAllProbes()

virtual void Ogre::ParallaxCorrectedCubemapBase::destroyAllProbes ( )
virtual

Reimplemented in Ogre::ParallaxCorrectedCubemap.

◆ destroyProbe()

virtual void Ogre::ParallaxCorrectedCubemapBase::destroyProbe ( CubemapProbe probe)
virtual

◆ eventOccurred()

virtual void Ogre::ParallaxCorrectedCubemapBase::eventOccurred ( const String eventName,
const NameValuePairList parameters 
)
virtual

A rendersystem-specific event occurred.

Parameters
eventNameThe name of the event which has occurred
parametersA list of parameters that may belong to this event, may be null if there are no parameters

Implements Ogre::RenderSystem::Listener.

◆ fillConstBufferData() [1/2]

static void Ogre::ParallaxCorrectedCubemapBase::fillConstBufferData ( const CubemapProbe probe,
const Matrix4 viewMatrix,
const Matrix3 invViewMat3,
float *RESTRICT_ALIAS  passBufferPtr 
)
static

◆ fillConstBufferData() [2/2]

virtual void Ogre::ParallaxCorrectedCubemapBase::fillConstBufferData ( const Matrix4 viewMatrix,
float *RESTRICT_ALIAS  passBufferPtr 
) const
virtual

Reimplemented in Ogre::ParallaxCorrectedCubemap.

◆ findIbl()

virtual TextureGpu* Ogre::ParallaxCorrectedCubemapBase::findIbl ( const TextureGpu baseParams)
virtual

◆ findTmpRtt()

virtual TextureGpu* Ogre::ParallaxCorrectedCubemapBase::findTmpRtt ( const TextureGpu baseParams)
virtual

See mTmpRtt.

Finds an RTT that is compatible to copy to baseParams. Creates one if none found.

Reimplemented in Ogre::ParallaxCorrectedCubemapAuto, and Ogre::ParallaxCorrectedCubemap.

◆ getAutomaticMode()

bool Ogre::ParallaxCorrectedCubemapBase::getAutomaticMode ( ) const
inline

◆ getBindTexture()

TextureGpu* Ogre::ParallaxCorrectedCubemapBase::getBindTexture ( ) const
inline

◆ getBindTrilinearSamplerblock()

const HlmsSamplerblock* Ogre::ParallaxCorrectedCubemapBase::getBindTrilinearSamplerblock ( )
inline

◆ getConstBufferSize()

virtual size_t Ogre::ParallaxCorrectedCubemapBase::getConstBufferSize ( )
virtual

Reimplemented in Ogre::ParallaxCorrectedCubemap.

◆ getDefaultWorkspaceDef()

const CompositorWorkspaceDef* Ogre::ParallaxCorrectedCubemapBase::getDefaultWorkspaceDef ( ) const

◆ getIblNumMipmaps()

static uint8 Ogre::ParallaxCorrectedCubemapBase::getIblNumMipmaps ( uint32  width,
uint32  height 
)
static

◆ getIblTargetTextureFlags()

uint32 Ogre::ParallaxCorrectedCubemapBase::getIblTargetTextureFlags ( PixelFormatGpu  pixelFormat) const

◆ getId()

IdType Ogre::IdObject::getId ( ) const
inlineinherited

Get the unique id of this object.

◆ getProbes()

const CubemapProbeVec& Ogre::ParallaxCorrectedCubemapBase::getProbes ( ) const
inline

◆ getSceneManager()

SceneManager* Ogre::ParallaxCorrectedCubemapBase::getSceneManager ( ) const

◆ getUseDpm2DArray()

bool Ogre::ParallaxCorrectedCubemapBase::getUseDpm2DArray ( ) const
inline

◆ isRendering()

bool Ogre::ParallaxCorrectedCubemapBase::isRendering ( ) const
inline

Inform whether we're currently updating a probe.

Some Hlms / PCC combinations should not perform PCC while rendering, either because the RenderTarget is the same as the cubemap texture, or because other glitches may occur

◆ operator()() [1/2]

bool Ogre::IdObject::operator() ( const IdObject left,
const IdObject right 
)
inlineinherited

◆ operator()() [2/2]

bool Ogre::IdObject::operator() ( const IdObject left,
const IdObject right 
)
inlineinherited

◆ passEarlyPreExecute()

virtual void Ogre::CompositorWorkspaceListener::passEarlyPreExecute ( CompositorPass pass)
inlinevirtualinherited

Called early on in pass' execution.

Happens before passPreExecute, before the pass has set anything. Warning: calling pass->execute can result in recursive calls.

◆ passPosExecute()

virtual void Ogre::CompositorWorkspaceListener::passPosExecute ( CompositorPass pass)
inlinevirtualinherited

Called after a pass has been executed.

Warning: calling pass->execute can result in recursive calls.

◆ passPreExecute()

virtual void Ogre::ParallaxCorrectedCubemapBase::passPreExecute ( CompositorPass pass)
virtual

Called when each pass is about to be executed.

Warning: calling pass->execute can result in recursive calls.

Reimplemented from Ogre::CompositorWorkspaceListener.

Reimplemented in Ogre::ParallaxCorrectedCubemapAuto, and Ogre::ParallaxCorrectedCubemap.

◆ passSceneAfterFrustumCulling()

virtual void Ogre::CompositorWorkspaceListener::passSceneAfterFrustumCulling ( CompositorPassScene pass)
inlinevirtualinherited

Called after a pass scene has performed frustum caulling but has yet to prepare and execute rendering commands.

Gets called after passSceneAfterFrustumCulling and before passPosExecute

Warning: calling pass->execute can result in recursive calls.

◆ passSceneAfterShadowMaps()

virtual void Ogre::CompositorWorkspaceListener::passSceneAfterShadowMaps ( CompositorPassScene pass)
inlinevirtualinherited

Called after a pass scene has rendered shadow casting (it gets called even if there is no shadow node).

Gets called after passPreExecute and before passSceneAfterFrustumCulling

Warning: calling pass->execute can result in recursive calls.

◆ prepareForClearScene()

virtual void Ogre::ParallaxCorrectedCubemapBase::prepareForClearScene ( )
virtual

Destroys the Proxy Items.

Useful if you need to call sceneManager->clearScene(); The you MUST call this function before. i.e. pcc->prepareForClearScene(); sceneManager->clearScene(); pcc->restoreFromClearScene(); Updating ParallaxCorrectedCubemap without calling prepareForClearScene/restoreFromClearScene will result in a crash.

Reimplemented in Ogre::ParallaxCorrectedCubemap.

◆ releaseIbl()

virtual void Ogre::ParallaxCorrectedCubemapBase::releaseIbl ( const TextureGpu tmpRtt)
virtual

◆ releaseTmpRtt()

virtual void Ogre::ParallaxCorrectedCubemapBase::releaseTmpRtt ( const TextureGpu tmpRtt)
virtual

◆ restoreFromClearScene()

virtual void Ogre::ParallaxCorrectedCubemapBase::restoreFromClearScene ( )
virtual

Reimplemented in Ogre::ParallaxCorrectedCubemap.

◆ updateAllDirtyProbes()

virtual void Ogre::ParallaxCorrectedCubemapBase::updateAllDirtyProbes ( )
pure virtual

By default the probes will be constructed when the user enters its vecinity.

This can cause noticeable stalls. Use this function to regenerate them all at once (i.e. at loading time)

Implemented in Ogre::ParallaxCorrectedCubemapAuto, and Ogre::ParallaxCorrectedCubemap.

◆ workspacePosUpdate()

virtual void Ogre::CompositorWorkspaceListener::workspacePosUpdate ( CompositorWorkspace workspace)
inlinevirtualinherited

Called after all nodes has been updated.

◆ workspacePreUpdate()

virtual void Ogre::CompositorWorkspaceListener::workspacePreUpdate ( CompositorWorkspace workspace)
inlinevirtualinherited

Called before all nodes are going to be updated.

Use this place to update your own, manually updated Workspaces without having to call @CompositorWorkspace::_beginUpdate( forceBeginFrame=true )

Member Data Documentation

◆ mMask

uint32 Ogre::ParallaxCorrectedCubemapBase::mMask

◆ mPaused

bool Ogre::ParallaxCorrectedCubemapBase::mPaused

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