OGRE-Next  3.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::DescriptorSetTexture Struct Reference

Descriptor sets describe what textures should be bound together in one place. More...

#include <OgreDescriptorSetTexture.h>

Public Member Functions

 DescriptorSetTexture ()
 
void checkValidity () const
 
bool operator!= (const DescriptorSetTexture &other) const
 Warning: This operator won't see changes in SRVs (i.e. More...
 
bool operator< (const DescriptorSetTexture &other) const
 

Public Attributes

uint16 mRefCount
 
void * mRsData
 Render-System specific data. More...
 
uint16 mShaderTypeTexCount [NumShaderTypes]
 
FastArray< const TextureGpu * > mTextures
 

Detailed Description

Descriptor sets describe what textures should be bound together in one place.

They must be pushed to mTexture in the order of ShaderType. For example if you want to use 2 textures bound to the pixel shader stage and 1 in the Geometry Shader stage: DescriptorSetTexture descSet; descSet.mTextures.push_back( pixelShaderTex0 ); descSet.mTextures.push_back( pixelShaderTex1 ); descSet.mTextures.push_back( geometryShaderTex1 ); descSet.mShaderTypeTexCount[PixelShader] = 2u; descSet.mShaderTypeTexCount[GeometryShader] = 1u;

const DescriptorSetTexture *finalSet = hlmsManager->getDescriptorSet( descSet ); finalSet can be used with RenderSystem::_setTextures

Remove finalSet once you're done using it. hlmsManager->destroyDescriptorSet( finalSet ); finalSet = 0;

Remarks
Do not create and destroy a set every frame. You should create it once, and reuse it until it is no longer necessary, then you should destroy it.

Constructor & Destructor Documentation

◆ DescriptorSetTexture()

Ogre::DescriptorSetTexture::DescriptorSetTexture ( )
inline

Member Function Documentation

◆ checkValidity()

void Ogre::DescriptorSetTexture::checkValidity ( ) const

◆ operator!=()

bool Ogre::DescriptorSetTexture::operator!= ( const DescriptorSetTexture other) const
inline

Warning: This operator won't see changes in SRVs (i.e.

data baked into mRsData). If you get notifyTextureChanged call, the SRV has changed and you must assume the DescriptorSetTexture has changed. SRV = Shader Resource View.

References mShaderTypeTexCount, mTextures, Ogre::NumShaderTypes, and Ogre::FastArray< T >::size().

◆ operator<()

bool Ogre::DescriptorSetTexture::operator< ( const DescriptorSetTexture other) const
inline

Member Data Documentation

◆ mRefCount

uint16 Ogre::DescriptorSetTexture::mRefCount

◆ mRsData

void* Ogre::DescriptorSetTexture::mRsData

Render-System specific data.

◆ mShaderTypeTexCount

uint16 Ogre::DescriptorSetTexture::mShaderTypeTexCount[NumShaderTypes]

Referenced by operator!=(), and operator<().

◆ mTextures

FastArray<const TextureGpu *> Ogre::DescriptorSetTexture::mTextures

Referenced by operator!=(), and operator<().


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