CardboardEyeTextureDescription

#include <cardboard.h>

Struct to hold information about an eye texture.

Summary

Public attributes

bottom_v
float
v coordinate of the bottom side of the eye.
left_u
float
u coordinate of the left side of the eye.
right_u
float
u coordinate of the right side of the eye.
texture
uint64_t
The texture with eye pixels.
top_v
float
v coordinate of the top side of the eye.

Public attributes

bottom_v

float CardboardEyeTextureDescription::bottom_v

v coordinate of the bottom side of the eye.

left_u

float CardboardEyeTextureDescription::left_u

u coordinate of the left side of the eye.

right_u

float CardboardEyeTextureDescription::right_u

u coordinate of the right side of the eye.

texture

uint64_t CardboardEyeTextureDescription::texture

The texture with eye pixels.

When using OpenGL ES 2.x and OpenGL ES 3.x, this field corresponds to a GLuint variable.

When using Metal, this field corresponds to a CFTypeRef variable pointing to a MTLTexture 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:

CardboardEyeTextureDescription leftEye;
leftEye.texture = CFBridgingRetain(_texture);
// Fill remaining fields in leftEye...
CardboardDistortionRenderer_renderEyeToDisplay(..., &leftEye, ...);
CFBridgingRelease(leftEye.texture);

top_v

float CardboardEyeTextureDescription::top_v

v coordinate of the top side of the eye.