Stay organized with collections
Save and categorize content based on your preferences.
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
top_v
float CardboardEyeTextureDescription::top_v
v coordinate of the top side of the eye.
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\u003eCardboardEyeTextureDescription\u003c/code\u003e stores information about an eye texture, including its coordinates and the texture itself.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etexture\u003c/code\u003e field holds the eye pixel data and can represent a GLuint, VkImage address, or a CFTypeRef to a MTLTexture depending on the graphics API used.\u003c/p\u003e\n"],["\u003cp\u003eCoordinates of the eye texture are represented by \u003ccode\u003eleft_u\u003c/code\u003e, \u003ccode\u003eright_u\u003c/code\u003e, \u003ccode\u003ebottom_v\u003c/code\u003e, and \u003ccode\u003etop_v\u003c/code\u003e, which define the boundaries of the texture for the eye.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers are responsible for managing the ownership and validity of the \u003ccode\u003etexture\u003c/code\u003e pointer during rendering to ensure proper usage by the Cardboard Distortion Renderer.\u003c/p\u003e\n"]]],[],null,["# CardboardEyeTextureDescription Struct Reference\n\nCardboardEyeTextureDescription\n==============================\n\n`#include \u003ccardboard.h\u003e`\n\nStruct to hold information about an eye texture.\n\nSummary\n-------\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------|-----------------------------------------------------|\n| [bottom_v](#struct_cardboard_eye_texture_description_1a69376f6b57613eec6c67937a3183e297) | `float` v coordinate of the bottom side of the eye. |\n| [left_u](#struct_cardboard_eye_texture_description_1af4cc22c5bdc74a9cdf8c5fe0292d55ed) | `float` u coordinate of the left side of the eye. |\n| [right_u](#struct_cardboard_eye_texture_description_1a47554a17ab96794de24d7b07daf73091) | `float` u coordinate of the right side of the eye. |\n| [texture](#struct_cardboard_eye_texture_description_1a4b8ba0d81890be841f7f500664994d63) | `uint64_t` The texture with eye pixels. |\n| [top_v](#struct_cardboard_eye_texture_description_1a2148d414b20e31b318eeae4c0b98daa3) | `float` v coordinate of the top side of the eye. |\n\nPublic attributes\n-----------------\n\n### bottom_v\n\n```scdoc\nfloat CardboardEyeTextureDescription::bottom_v\n``` \nv coordinate of the bottom side of the eye. \n\n### left_u\n\n```scdoc\nfloat CardboardEyeTextureDescription::left_u\n``` \nu coordinate of the left side of the eye. \n\n### right_u\n\n```scdoc\nfloat CardboardEyeTextureDescription::right_u\n``` \nu coordinate of the right side of the eye. \n\n### texture\n\n```scdoc\nuint64_t CardboardEyeTextureDescription::texture\n``` \nThe texture with eye pixels.\n\nWhen using OpenGL ES 2.x and OpenGL ES 3.x, this field corresponds to a GLuint variable.\n\nWhen using Vulkan, this field corresponds to an uint64_t address pointing to a `VkImage` variable.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\nVkImage image;\n// Initialize and set up the image...\nCardboardEyeTextureDescription leftEye;\nleftEye.texture = reinterpret_cast(image)\n// Fill remaining fields in leftEye...\n/cardboard/reference/c/group/distortion-renderer#group__distortion-renderer_1gab5fbf6c9f3dbe5029d228fa2cc68aa80(..., &leftEye, ...);\n// Clear previous image if it is needed.\n```\n\n\u003cbr /\u003e\n\nWhen 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](/cardboard/reference/c/group/distortion-renderer#group__distortion-renderer_1gab5fbf6c9f3dbe5029d228fa2cc68aa80) function execution to ensure it is properly retained. Usage example:\n\n\n```scdoc\nCardboardEyeTextureDescription leftEye;\nleftEye.texture = CFBridgingRetain(_texture);\n// Fill remaining fields in leftEye...\nCardboardDistortionRenderer_renderEyeToDisplay(..., &leftEye, ...);\nCFBridgingRelease(leftEye.texture);\n```\n\n\u003cbr /\u003e\n\n### top_v\n\n```scdoc\nfloat CardboardEyeTextureDescription::top_v\n``` \nv coordinate of the top side of the eye."]]