Stay organized with collections
Save and categorize content based on your preferences.
#include <cardboard.h>
Struct to set Metal distortion renderer configuration.
Summary
Public attributes
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eCardboardMetalDistortionRendererConfig\u003c/code\u003e is a struct used to configure a Metal distortion renderer in Cardboard.\u003c/p\u003e\n"],["\u003cp\u003eIt includes settings for color, depth, and stencil attachment pixel formats, all using \u003ccode\u003eMTLPixelFormat\u003c/code\u003e enum values.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003emtl_device\u003c/code\u003e attribute requires a \u003ccode\u003eMTLDevice\u003c/code\u003e object, and users are responsible for its ownership and validity.\u003c/p\u003e\n"],["\u003cp\u003eThe struct is primarily utilized during the creation of a \u003ccode\u003eCardboardMetalDistortionRenderer\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# CardboardMetalDistortionRendererConfig Struct Reference\n\nCardboardMetalDistortionRendererConfig\n======================================\n\n`#include \u003ccardboard.h\u003e`\n\nStruct to set Metal distortion renderer configuration.\n\nSummary\n-------\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|\n| [color_attachment_pixel_format](#struct_cardboard_metal_distortion_renderer_config_1a3ef55238343385b7ab0a27f93a6aaf9a) | `uint64_t` Color attachment pixel format. |\n| [depth_attachment_pixel_format](#struct_cardboard_metal_distortion_renderer_config_1ae3d7941b07415a265ca32921626bc48b) | `uint64_t` Depth attachment pixel format. |\n| [mtl_device](#struct_cardboard_metal_distortion_renderer_config_1a3211134e035fc2108c7f468302d7e4dc) | `uint64_t` MTLDevice id. |\n| [stencil_attachment_pixel_format](#struct_cardboard_metal_distortion_renderer_config_1ad1c95a38f72fcd40f0cbc1f96f4365ad) | `uint64_t` Stencil attachment pixel format. |\n\nPublic attributes\n-----------------\n\n### color_attachment_pixel_format\n\n```scdoc\nuint64_t CardboardMetalDistortionRendererConfig::color_attachment_pixel_format\n``` \nColor attachment pixel format.\n\nThis field holds a [MTLPixelFormat enum value](https://developer.apple.com/documentation/metalkit/mtkview/1535940-colorpixelformat?language=objc). \n\n### depth_attachment_pixel_format\n\n```scdoc\nuint64_t CardboardMetalDistortionRendererConfig::depth_attachment_pixel_format\n``` \nDepth attachment pixel format.\n\nThis field holds a [MTLPixelFormat enum value](https://developer.apple.com/documentation/metalkit/mtkview/1535940-colorpixelformat?language=objc). \n\n### mtl_device\n\n```scdoc\nuint64_t CardboardMetalDistortionRendererConfig::mtl_device\n``` \nMTLDevice id.\n\nThis field holds a CFTypeRef variable pointing to a MTLDevice object. The SDK client is expected to manage the object ownership and to guarantee the pointer validity during the CardboardMetalDistortionRenderer_create function execution to ensure it is properly retained. Usage example:\n\n\n```scdoc\nCardboardMetalDistortionRendererConfig config;\nconfig.mtl_device = CFBridgingRetain(mtlDevice);\nCardboardDistortionRenderer *distortionRenderer =\n CardboardMetalDistortionRenderer_create(&config);\nCFBridgingRelease(config.mtl_device);\n```\n\n\u003cbr /\u003e\n\n### stencil_attachment_pixel_format\n\n```scdoc\nuint64_t CardboardMetalDistortionRendererConfig::stencil_attachment_pixel_format\n``` \nStencil attachment pixel format.\n\nThis field holds a [MTLPixelFormat enum value](https://developer.apple.com/documentation/metalkit/mtkview/1535940-colorpixelformat?language=objc)."]]