OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::SampleDescription Struct Reference

Opaque struct that holds effective FSAA (MSAA, CSAA, etc.) mode. More...

#include <OgreCommon.h>

Public Member Functions

 SampleDescription (const String &fsaaSetting)
 
 SampleDescription (uint8 msaa=1u, MsaaPatterns::MsaaPatterns pattern=MsaaPatterns::Undefined)
 
void _set (uint8 colourSamples, uint8 coverageSamples, MsaaPatterns::MsaaPatterns pattern)
 For internal use. More...
 
uint8 getColourSamples () const
 
uint8 getCoverageSamples () const
 
void getFsaaDesc (LwString &outFsaaSetting) const
 Appends the FSAA description to the string. More...
 
void getFsaaDesc (String &outFsaaSetting) const
 Appends the FSAA description to the string. More...
 
uint8 getMaxSamples () const
 
MsaaPatterns::MsaaPatterns getMsaaPattern () const
 
bool isCsaa () const
 Returns true if this is CSAA, whether it's quality or not. More...
 
bool isCsaaQuality () const
 Returns true if this is CSAA in quality mode. More...
 
bool isMsaa () const
 
bool isMultisample () const
 
bool operator!= (const SampleDescription &rhs) const
 
bool operator< (const SampleDescription &other) const
 
bool operator== (const SampleDescription &rhs) const
 
void parseString (const String &fsaaSetting)
 
void setCsaa (uint8 samples, bool bQuality)
 Set CSAA by NVIDIA's marketing names e.g. More...
 
void setEqaa (uint8 colourSamples, uint8 coverageSamples)
 Set EQAA by its marketing number (which coincides with its technical spec) e.g. More...
 
void setMsaa (uint8 msaa, MsaaPatterns::MsaaPatterns pattern=MsaaPatterns::Undefined)
 

Detailed Description

Opaque struct that holds effective FSAA (MSAA, CSAA, etc.) mode.

Note that you can request a SampleDescription, but you may get the closest quality if that particular setting is not supported by the GPU.

Additionally, device lost events can cause FSAA settings to be degraded on the fly Listen for TextureGpuListener::FsaaSettingAlteredByApi events to be notified of this

Constructor & Destructor Documentation

◆ SampleDescription() [1/2]

Ogre::SampleDescription::SampleDescription ( uint8  msaa = 1u,
MsaaPatterns::MsaaPatterns  pattern = MsaaPatterns::Undefined 
)
inline

◆ SampleDescription() [2/2]

Ogre::SampleDescription::SampleDescription ( const String fsaaSetting)
inlineexplicit

Member Function Documentation

◆ _set()

void Ogre::SampleDescription::_set ( uint8  colourSamples,
uint8  coverageSamples,
MsaaPatterns::MsaaPatterns  pattern 
)

For internal use.

◆ getColourSamples()

uint8 Ogre::SampleDescription::getColourSamples ( ) const
inline

◆ getCoverageSamples()

uint8 Ogre::SampleDescription::getCoverageSamples ( ) const
inline

◆ getFsaaDesc() [1/2]

void Ogre::SampleDescription::getFsaaDesc ( LwString outFsaaSetting) const

Appends the FSAA description to the string.

◆ getFsaaDesc() [2/2]

void Ogre::SampleDescription::getFsaaDesc ( String outFsaaSetting) const

Appends the FSAA description to the string.

◆ getMaxSamples()

uint8 Ogre::SampleDescription::getMaxSamples ( ) const
inline

◆ getMsaaPattern()

MsaaPatterns::MsaaPatterns Ogre::SampleDescription::getMsaaPattern ( ) const
inline

◆ isCsaa()

bool Ogre::SampleDescription::isCsaa ( ) const

Returns true if this is CSAA, whether it's quality or not.

Remarks
There is some overlap between CSAA and EQAA modes, hence this function may return true even if setEqaa was called

◆ isCsaaQuality()

bool Ogre::SampleDescription::isCsaaQuality ( ) const

Returns true if this is CSAA in quality mode.

Remarks
There is some overlap between CSAA and EQAA modes, hence this function may return true even if setEqaa was called

◆ isMsaa()

bool Ogre::SampleDescription::isMsaa ( ) const

◆ isMultisample()

bool Ogre::SampleDescription::isMultisample ( ) const
inline

◆ operator!=()

bool Ogre::SampleDescription::operator!= ( const SampleDescription rhs) const
inline

◆ operator<()

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

◆ operator==()

bool Ogre::SampleDescription::operator== ( const SampleDescription rhs) const
inline

◆ parseString()

void Ogre::SampleDescription::parseString ( const String fsaaSetting)

◆ setCsaa()

void Ogre::SampleDescription::setCsaa ( uint8  samples,
bool  bQuality 
)

Set CSAA by NVIDIA's marketing names e.g.

8x CSAA call setCsaa( 8u, false ) 8x CSAA (Quality) then call setCsaa( 8u, true ) 16x CSAA call setCsaa( 16u, false ) 16x CSAA (Quality) then call setCsaa( 16u, true )

Parameters
samplesMarketing value. Can be 8 or 16
bQualityTrue to use the 'quality' variation, false otherwise

◆ setEqaa()

void Ogre::SampleDescription::setEqaa ( uint8  colourSamples,
uint8  coverageSamples 
)

Set EQAA by its marketing number (which coincides with its technical spec) e.g.

2f4x EQAA call setEqaa( 2u, 4u ) 4f8x EQAA call setEqaa( 4u, 8u ) 8f16x EQAA call setEqaa( 8u, 16u )

Parameters
mColourSamples
coverageSample

◆ setMsaa()

void Ogre::SampleDescription::setMsaa ( uint8  msaa,
MsaaPatterns::MsaaPatterns  pattern = MsaaPatterns::Undefined 
)

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