ConfettiFX / The-Forge

The Forge Cross-Platform Rendering Framework PC Windows, Steamdeck (native), Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2
Apache License 2.0
4.65k stars 491 forks source link

Request: Support Xcode Quick Look Debugging #232

Closed Michael-Lfx closed 4 months ago

Michael-Lfx commented 2 years ago

It's convenient for multimedia developers to view the content of texture using Xcode Quick Look Debugging without capturing the whole gpu frame which can spend a few seconds for replaying a complex frame.

Maybe the following code is acceptable for a temp debug session.

TextureLoadDesc textureDesc = {};
textureDesc.pFileName = "QuickLookTest";
textureDesc.ppTexture = &pDebugTexture;
textureDesc.mContainer = TEXTURE_CONTAINER_JPG;
addResource(&textureDesc, NULL);
// ...
waitForAllResourceLoads();

TextureXcodeQuickLook* quickLook = [[TextureXcodeQuickLook alloc] initWithTexture:pDebugTexture];
printf("%p\n", quickLook); //meaningless, just for avoiding compile warning

It looks like the following debug screen capture of demo 01_Transformations.

截屏2021-10-29 下午7 13 35
wolfgangfengel commented 4 months ago

Sorry TF is mostly for game developers. It wouldn't be a good idea to add something on the App code for XCode.