CardboardDistortionRendererTargetConfig

#include <cardboard.h>

Struct to set Metal distortion renderer target configuration.

Summary

Public attributes

render_command_encoder
uint64_t
MTLRenderCommandEncoder id.
screen_height
int
Full height of the screen in pixels.
screen_width
int
Full width of the screen in pixels.

Public attributes

render_command_encoder

uint64_t CardboardDistortionRendererTargetConfig::render_command_encoder

MTLRenderCommandEncoder id.

This 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 function execution to ensure it is properly retained. Usage example:

CardboardDistortionRendererTargetConfig target_config;
target_config.render_command_encoder =
    CFBridgingRetain(renderCommandEncoder);
CardboardDistortionRenderer_renderEyeToDisplay(..., &target_config, ...);
CFBridgingRelease(target_config.render_command_encoder);

screen_height

int CardboardDistortionRendererTargetConfig::screen_height

Full height of the screen in pixels.

screen_width

int CardboardDistortionRendererTargetConfig::screen_width

Full width of the screen in pixels.