OGRE-Next: Ogre::DescriptorSetTexture Struct Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Ogre::DescriptorSetTexture Struct Reference
Core » Resources

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.
bool | operator< (const DescriptorSetTexture &other) const

## Public Attributes
uint16 | mRefCount
void * | mRsData
| Render-System specific data.
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

References mRefCount, mRsData, and mShaderTypeTexCount.

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

## 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 DescriptorSetTexture(), mShaderTypeTexCount, mTextures, and Ogre::NumShaderTypes.

## ◆ operator<()

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

References DescriptorSetTexture(), mShaderTypeTexCount, mTextures, and Ogre::NumShaderTypes.

## Member Data Documentation

## ◆ mRefCount

uint16 Ogre::DescriptorSetTexture::mRefCount

Referenced by DescriptorSetTexture().

## ◆ mRsData

void* Ogre::DescriptorSetTexture::mRsData

Render-System specific data.

Referenced by DescriptorSetTexture().

## ◆ mShaderTypeTexCount

uint16 Ogre::DescriptorSetTexture::mShaderTypeTexCount[NumShaderTypes]

Referenced by DescriptorSetTexture(), 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:

- OgreDescriptorSetTexture.h