CardboardMetalDistortionRendererConfig

#include <cardboard.h>

Struct to set Metal distortion renderer configuration.

Summary

Public attributes

color_attachment_pixel_format
uint64_t
Color attachment pixel format.
depth_attachment_pixel_format
uint64_t
Depth attachment pixel format.
mtl_device
uint64_t
MTLDevice id.
stencil_attachment_pixel_format
uint64_t
Stencil attachment pixel format.

Public attributes

color_attachment_pixel_format

uint64_t CardboardMetalDistortionRendererConfig::color_attachment_pixel_format

Color attachment pixel format.

This field holds a MTLPixelFormat enum value.

depth_attachment_pixel_format

uint64_t CardboardMetalDistortionRendererConfig::depth_attachment_pixel_format

Depth attachment pixel format.

This field holds a MTLPixelFormat enum value.

mtl_device

uint64_t CardboardMetalDistortionRendererConfig::mtl_device

MTLDevice id.

This 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:

CardboardMetalDistortionRendererConfig config;
config.mtl_device = CFBridgingRetain(mtlDevice);
CardboardDistortionRenderer *distortionRenderer =
    CardboardMetalDistortionRenderer_create(&config);
CFBridgingRelease(config.mtl_device);

stencil_attachment_pixel_format

uint64_t CardboardMetalDistortionRendererConfig::stencil_attachment_pixel_format

Stencil attachment pixel format.

This field holds a MTLPixelFormat enum value.