MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / parseString

Method parseString

OgreMain/src/OgreCommon.cpp:117–141  ·  view source on GitHub ↗

-----------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

115 }
116 //-----------------------------------------------------------------------------------
117 void SampleDescription::parseString( const String &fsaaSetting )
118 {
119 const uint8 samples =
120 static_cast<uint8>( std::max( 1u, StringConverter::parseUnsignedInt( fsaaSetting ) ) );
121 const bool csaa = fsaaSetting.find( "CSAA" ) != String::npos;
122 const bool eqaa = fsaaSetting.find( "EQAA" ) != String::npos;
123
124 if( csaa )
125 {
126 // "8x CSAA", "8xQ CSAA", "16x CSAA", "16xQ CSAA", also "8 [Quality]", "16 [Quality]"
127 bool qualityHint = samples >= 8u && ( fsaaSetting.find( "Quality" ) != String::npos ||
128 fsaaSetting.find( "xQ CSAA" ) != String::npos );
129 setCsaa( samples, qualityHint );
130 }
131 else if( eqaa )
132 {
133 // "2f4x EQAA", "4f8x EQAA", "4f16x EQAA", "8f16x EQAA", but not Dx9 only "2f8x EQAA"
134 if( fsaaSetting.find( "4f16x" ) != String::npos )
135 setEqaa( 4, 16 );
136 else
137 setEqaa( samples, static_cast<uint8>( samples << 1u ) );
138 }
139 else
140 setMsaa( samples ); // "Nx MSAA", also "Nx", "N"
141 }
142 //-----------------------------------------------------------------------------------
143 bool SampleDescription::isCsaa() const
144 {

Callers 6

D3D11WindowMethod · 0.80
setFsaaMethod · 0.80
_initializeMethod · 0.80
parseSharedParamsMethod · 0.80
createMethod · 0.80
createMethod · 0.80

Calls 1

findMethod · 0.45

Tested by

no test coverage detected