Stay organized with collections
Save and categorize content based on your preferences.
#include <cardboard.h>
Struct to set Metal distortion renderer target configuration.
Summary
Public attributes
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eCardboardMetalDistortionRendererTargetConfig\u003c/code\u003e is a struct used to configure the Metal distortion renderer target in Cardboard.\u003c/p\u003e\n"],["\u003cp\u003eIt includes \u003ccode\u003erender_command_encoder\u003c/code\u003e, \u003ccode\u003escreen_height\u003c/code\u003e, and \u003ccode\u003escreen_width\u003c/code\u003e attributes to specify the rendering environment.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003erender_command_encoder\u003c/code\u003e should point to a valid \u003ccode\u003eMTLRenderCommandEncoder\u003c/code\u003e object managed by the client.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003escreen_height\u003c/code\u003e and \u003ccode\u003escreen_width\u003c/code\u003e define the full dimensions of the screen in pixels for rendering.\u003c/p\u003e\n"]]],[],null,["# CardboardMetalDistortionRendererTargetConfig Struct Reference\n\nCardboardMetalDistortionRendererTargetConfig\n============================================\n\n`#include \u003ccardboard.h\u003e`\n\nStruct to set Metal distortion renderer target configuration.\n\nSummary\n-------\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------------------------------|--------------------------------------------|\n| [render_command_encoder](#struct_cardboard_metal_distortion_renderer_target_config_1af16067279346bf70ae18c2412731e23c) | `uint64_t` MTLRenderCommandEncoder id. |\n| [screen_height](#struct_cardboard_metal_distortion_renderer_target_config_1ae7dd4e53679e50fc4f67d6ee311f356f) | `int` Full height of the screen in pixels. |\n| [screen_width](#struct_cardboard_metal_distortion_renderer_target_config_1a25c4e137893a489d3d5d6010003bd133) | `int` Full width of the screen in pixels. |\n\nPublic attributes\n-----------------\n\n### render_command_encoder\n\n```scdoc\nuint64_t CardboardMetalDistortionRendererTargetConfig::render_command_encoder\n``` \nMTLRenderCommandEncoder id.\n\nThis field holds a CFTypeRef variable pointing to a `MTLRenderCommandEncoder` object. The SDK client is expected to manage the object ownership and to guarantee the pointer validity during the [CardboardDistortionRenderer_renderEyeToDisplay](/cardboard/reference/c/group/distortion-renderer#group__distortion-renderer_1gab5fbf6c9f3dbe5029d228fa2cc68aa80) function execution to ensure it is properly retained. Usage example:\n\n\n```scdoc\nCardboardMetalDistortionRendererTargetConfig target_config;\ntarget_config.render_command_encoder =\n CFBridgingRetain(renderCommandEncoder);\nCardboardDistortionRenderer_renderEyeToDisplay(..., &target_config, ...);\nCFBridgingRelease(target_config.render_command_encoder);\n```\n\n\u003cbr /\u003e\n\n### screen_height\n\n```scdoc\nint CardboardMetalDistortionRendererTargetConfig::screen_height\n``` \nFull height of the screen in pixels. \n\n### screen_width\n\n```scdoc\nint CardboardMetalDistortionRendererTargetConfig::screen_width\n``` \nFull width of the screen in pixels."]]