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

#include <OgrePixelFormatGpu.h>

+ Inheritance diagram for Ogre::PixelFormatToShaderType:

Public Member Functions

virtual const char * getDataType (PixelFormatGpu pixelFormat, uint32 textureType, bool isMsaa, ResourceAccess::ResourceAccess access) const =0
 
virtual const char * getPixelFormatType (PixelFormatGpu pixelFormat) const =0
 Converts a PixelFormat into its equivalent layout for image variables (GLSL) or its equivalent for D3D11/12 variables (HLSL). More...
 

Member Function Documentation

◆ getDataType()

virtual const char* Ogre::PixelFormatToShaderType::getDataType ( PixelFormatGpu  pixelFormat,
uint32  textureType,
bool  isMsaa,
ResourceAccess::ResourceAccess  access 
) const
pure virtual
Parameters
pixelFormat
textureTypeSee TextureTypes::TextureTypes
isMsaa
accessTexture access. Use ResourceAccess::Undefined for requesting sampling mode
Returns
String for the shader to use "as is". Returned pointer may be null. The validity of the pointer lasts as long as the RenderSystem remains loaded.

Implemented in Ogre::VulkanPixelFormatToShaderType, Ogre::MetalPixelFormatToShaderType, Ogre::GL3PlusPixelFormatToShaderType, Ogre::D3D11PixelFormatToShaderType, and Ogre::NULLPixelFormatToShaderType.

◆ getPixelFormatType()

virtual const char* Ogre::PixelFormatToShaderType::getPixelFormatType ( PixelFormatGpu  pixelFormat) const
pure virtual

Converts a PixelFormat into its equivalent layout for image variables (GLSL) or its equivalent for D3D11/12 variables (HLSL).

Used mostly with UAVs.

Parameters
pixelFormatPixel format to convert.
Returns
String for the shader to use "as is". If the Pixel Format doesn't have a shader equivalent (i.e. depth formats), a null pointer is returned. The validity of the pointer lasts as long as the RenderSystem remains loaded.

Implemented in Ogre::VulkanPixelFormatToShaderType, Ogre::MetalPixelFormatToShaderType, Ogre::GL3PlusPixelFormatToShaderType, Ogre::D3D11PixelFormatToShaderType, and Ogre::NULLPixelFormatToShaderType.


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