MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / _WICToDXGI

Function _WICToDXGI

SampleFramework11/v1.02/Graphics/WICTextureLoader.cpp:229–246  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

227
228//---------------------------------------------------------------------------------
229static DXGI_FORMAT _WICToDXGI( const GUID& guid )
230{
231 for( size_t i=0; i < _countof(g_WICFormats); ++i )
232 {
233 if ( memcmp( &g_WICFormats[i].wic, &guid, sizeof(GUID) ) == 0 )
234 return g_WICFormats[i].format;
235 }
236
237#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
238 if ( g_WIC2 )
239 {
240 if ( memcmp( &GUID_WICPixelFormat96bppRGBFloat, &guid, sizeof(GUID) ) == 0 )
241 return DXGI_FORMAT_R32G32B32_FLOAT;
242 }
243#endif
244
245 return DXGI_FORMAT_UNKNOWN;
246}
247
248//---------------------------------------------------------------------------------
249static size_t _WICBitsPerPixel( REFGUID targetGuid )

Callers 1

CreateTextureFromWICFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected