MCPcopy Create free account
hub / github.com/carbonengine/trinity / CreateUpscalingContext

Method CreateUpscalingContext

trinity/TriDevice.cpp:1354–1373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1352}
1353
1354uint32_t TriDevice::CreateUpscalingContext( uint32_t displayWidth, uint32_t displayHeight, Tr2RenderContextEnum::PixelFormat sourceFormat, Tr2RenderContextEnum::DepthStencilFormat depthFormat, bool allowFramegen, Be::Optional<uint32_t> existingContext )
1355{
1356 CCP_STATS_ZONE( __FUNCTION__ );
1357
1358 USE_MAIN_THREAD_RENDER_CONTEXT();
1359
1360 Tr2UpscalingAL::UpscalingContextParams params = Tr2UpscalingAL::UpscalingContextParams( renderContext );
1361 params.allowFramegen = allowFramegen;
1362 params.displayWidth = displayWidth;
1363 params.displayHeight = displayHeight;
1364 params.sourceFormat = sourceFormat;
1365 params.depthFormat = depthFormat;
1366
1367 auto context = renderContext.CreateUpscalingContext( params, existingContext.IsAssigned() ? existingContext.GetValue() : Tr2UpscalingAL::INVALID_CONTEXT_ID );
1368 if( context )
1369 {
1370 return context->GetID();
1371 }
1372 return Tr2UpscalingAL::INVALID_CONTEXT_ID;
1373}
1374
1375void TriDevice::DeleteUpscalingContext( uint32_t contextID )
1376{

Callers 1

SetupUpscalingMethod · 0.45

Calls 3

GetValueMethod · 0.45
GetIDMethod · 0.45

Tested by

no test coverage detected