Google VR Types

Various types used in the Google VR NDK.

Summary

Enumerations

@0{
  GVR_CONTROLLER_ENABLE_ORIENTATION = 1 << 0,
  GVR_CONTROLLER_ENABLE_TOUCH = 1 << 1,
  GVR_CONTROLLER_ENABLE_GYRO = 1 << 2,
  GVR_CONTROLLER_ENABLE_ACCEL = 1 << 3,
  GVR_CONTROLLER_ENABLE_GESTURES = 1 << 4,
  GVR_CONTROLLER_ENABLE_POSE_PREDICTION = 1 << 5,
  GVR_CONTROLLER_ENABLE_POSITION = 1 << 6,
  GVR_CONTROLLER_ENABLE_BATTERY = 1 << 7
}
enum
Controller API options (bit flags).
@1{
  GVR_EXTERNAL_SURFACE_ID_NONE = -1,
  GVR_BUFFER_INDEX_EXTERNAL_SURFACE = -1
}
enum
gvr_audio_distance_rolloff_type{
  GVR_AUDIO_ROLLOFF_LOGARITHMIC = 0,
  GVR_AUDIO_ROLLOFF_LINEAR = 1,
  GVR_AUDIO_ROLLOFF_NONE = 2
}
enum
Distance rolloff models used for distance attenuation.
gvr_audio_material_type{
  GVR_AUDIO_MATERIAL_TRANSPARENT = 0,
  GVR_AUDIO_MATERIAL_ACOUSTIC_CEILING_TILES = 1,
  GVR_AUDIO_MATERIAL_BRICK_BARE = 2,
  GVR_AUDIO_MATERIAL_BRICK_PAINTED = 3,
  GVR_AUDIO_MATERIAL_CONCRETE_BLOCK_COARSE = 4,
  GVR_AUDIO_MATERIAL_CONCRETE_BLOCK_PAINTED = 5,
  GVR_AUDIO_MATERIAL_CURTAIN_HEAVY = 6,
  GVR_AUDIO_MATERIAL_FIBER_GLASS_INSULATION = 7,
  GVR_AUDIO_MATERIAL_GLASS_THIN = 8,
  GVR_AUDIO_MATERIAL_GLASS_THICK = 9,
  GVR_AUDIO_MATERIAL_GRASS = 10,
  GVR_AUDIO_MATERIAL_LINOLEUM_ON_CONCRETE = 11,
  GVR_AUDIO_MATERIAL_MARBLE = 12,
  GVR_AUDIO_MATERIAL_METAL = 13,
  GVR_AUDIO_MATERIAL_PARQUET_ON_CONCRETE = 14,
  GVR_AUDIO_MATERIAL_PLASTER_ROUGH = 15,
  GVR_AUDIO_MATERIAL_PLASTER_SMOOTH = 16,
  GVR_AUDIO_MATERIAL_PLYWOOD_PANEL = 17,
  GVR_AUDIO_MATERIAL_POLISHED_CONCRETE_OR_TILE = 18,
  GVR_AUDIO_MATERIAL_SHEET_ROCK = 19,
  GVR_AUDIO_MATERIAL_WATER_OR_ICE_SURFACE = 20,
  GVR_AUDIO_MATERIAL_WOOD_CEILING = 21,
  GVR_AUDIO_MATERIAL_WOOD_PANEL = 22
}
enum
Room surface material names, used to set room properties.
gvr_audio_rendering_mode{
  GVR_AUDIO_RENDERING_STEREO_PANNING = 0,
  GVR_AUDIO_RENDERING_BINAURAL_LOW_QUALITY = 1,
  GVR_AUDIO_RENDERING_BINAURAL_HIGH_QUALITY = 2
}
enum
Rendering modes define CPU load / rendering quality balances.
gvr_audio_surround_format_type enum
Supported surround sound formats.
gvr_color_format_type{
  GVR_COLOR_FORMAT_RGBA_8888 = 0,
  GVR_COLOR_FORMAT_RGB_565 = 1
}
enum
Valid color formats for swap chain buffers.
gvr_controller_api_status{
  GVR_CONTROLLER_API_OK = 0,
  GVR_CONTROLLER_API_UNSUPPORTED = 1,
  GVR_CONTROLLER_API_NOT_AUTHORIZED = 2,
  GVR_CONTROLLER_API_UNAVAILABLE = 3,
  GVR_CONTROLLER_API_SERVICE_OBSOLETE = 4,
  GVR_CONTROLLER_API_CLIENT_OBSOLETE = 5,
  GVR_CONTROLLER_API_MALFUNCTION = 6
}
enum
Constants that represent the status of the controller API.
gvr_controller_battery_level{
  GVR_CONTROLLER_BATTERY_LEVEL_COUNT = 6
}
enum
Controller battery states.
gvr_controller_button{
  GVR_CONTROLLER_BUTTON_CLICK = 1,
  GVR_CONTROLLER_BUTTON_COUNT = 6
}
enum
Controller buttons.
gvr_controller_connection_state{
  GVR_CONTROLLER_DISCONNECTED = 0,
  GVR_CONTROLLER_SCANNING = 1,
  GVR_CONTROLLER_CONNECTING = 2,
  GVR_CONTROLLER_CONNECTED = 3
}
enum
Constants that represent the state of the controller.
gvr_controller_handedness enum
gvr_depth_stencil_format_type{
  GVR_DEPTH_STENCIL_FORMAT_NONE = 255,
  GVR_DEPTH_STENCIL_FORMAT_DEPTH_16 = 0,
  GVR_DEPTH_STENCIL_FORMAT_DEPTH_24 = 1,
  GVR_DEPTH_STENCIL_FORMAT_DEPTH_24_STENCIL_8 = 2,
  GVR_DEPTH_STENCIL_FORMAT_DEPTH_32_F = 3,
  GVR_DEPTH_STENCIL_FORMAT_DEPTH_32_F_STENCIL_8 = 4,
  GVR_DEPTH_STENCIL_FORMAT_STENCIL_8 = 5
}
enum
gvr_error enum
Constants that represent GVR error codes.
gvr_eye enum
An enum for the left and right eye.
gvr_feature enum
gvr_reprojection{
  GVR_REPROJECTION_NONE = 0,
  GVR_REPROJECTION_FULL = 1
}
enum
Types of asynchronous reprojection.
gvr_viewer_type{
  GVR_VIEWER_TYPE_CARDBOARD = 0,
  GVR_VIEWER_TYPE_DAYDREAM = 1
}
enum
The type of VR viewer.

Typedefs

gvr_audio_source_id typedef
int32_t
Sound object and sound field identifier.
gvr_context typedef
struct gvr_context_
Primary context for invoking Google VR APIs.
gvr_user_prefs typedef
struct gvr_user_prefs_

Enumerations

@0

 @0

Controller API options (bit flags).

Properties
GVR_CONTROLLER_ENABLE_ACCEL

Indicates that controller accelerometer data should be reported.

GVR_CONTROLLER_ENABLE_BATTERY

Indicates that controller battery data should be reported.

GVR_CONTROLLER_ENABLE_GESTURES

Indicates that controller gestures should be reported.

GVR_CONTROLLER_ENABLE_GYRO

Indicates that controller gyroscope data should be reported.

GVR_CONTROLLER_ENABLE_ORIENTATION

Indicates that controller orientation data should be reported.

GVR_CONTROLLER_ENABLE_POSE_PREDICTION

Indicates that controller pose prediction should be enabled.

GVR_CONTROLLER_ENABLE_POSITION

Indicates that controller position data should be reported.

GVR_CONTROLLER_ENABLE_TOUCH

Indicates that controller touchpad data should be reported.

@1

 @1
Properties
GVR_BUFFER_INDEX_EXTERNAL_SURFACE

Special index for a source buffer that has the same contents as the external surface attached to the given viewport.

Pass this to gvr_buffer_viewport_set_source_buffer_index() to use the external surface as the buffer contents.

GVR_EXTERNAL_SURFACE_ID_NONE

Constant that represents a nonexistent external surface.

Pass to gvr_buffer_viewport_set_external_surface_id() to disable sampling from an external surface.

gvr_audio_distance_rolloff_type

 gvr_audio_distance_rolloff_type

Distance rolloff models used for distance attenuation.

Properties
GVR_AUDIO_ROLLOFF_LINEAR

Linear distance rolloff model.

GVR_AUDIO_ROLLOFF_LOGARITHMIC

Logarithmic distance rolloff model.

GVR_AUDIO_ROLLOFF_NONE

No distance attenuation will be applied.

gvr_audio_material_type

 gvr_audio_material_type

Room surface material names, used to set room properties.

Properties
GVR_AUDIO_MATERIAL_ACOUSTIC_CEILING_TILES

Acoustic ceiling tiles, absorbs most frequencies.

GVR_AUDIO_MATERIAL_BRICK_BARE

Bare brick, relatively reflective.

GVR_AUDIO_MATERIAL_BRICK_PAINTED

Painted brick.

GVR_AUDIO_MATERIAL_CONCRETE_BLOCK_COARSE

Coarse surface concrete block.

GVR_AUDIO_MATERIAL_CONCRETE_BLOCK_PAINTED

Painted concrete block.

GVR_AUDIO_MATERIAL_CURTAIN_HEAVY

Heavy curtains.

GVR_AUDIO_MATERIAL_FIBER_GLASS_INSULATION

Fiber glass insulation.

GVR_AUDIO_MATERIAL_GLASS_THICK

Thick glass.

GVR_AUDIO_MATERIAL_GLASS_THIN

Thin glass.

GVR_AUDIO_MATERIAL_GRASS

Grass.

GVR_AUDIO_MATERIAL_LINOLEUM_ON_CONCRETE

Linoleum on concrete.

GVR_AUDIO_MATERIAL_MARBLE

Marble.

GVR_AUDIO_MATERIAL_METAL

Galvanized sheet metal.

GVR_AUDIO_MATERIAL_PARQUET_ON_CONCRETE

Wooden parquet on concrete.

GVR_AUDIO_MATERIAL_PLASTER_ROUGH

Rough plaster surface.

GVR_AUDIO_MATERIAL_PLASTER_SMOOTH

Smooth plaster surface.

GVR_AUDIO_MATERIAL_PLYWOOD_PANEL

Plywood panel.

GVR_AUDIO_MATERIAL_POLISHED_CONCRETE_OR_TILE

Polished concrete OR tile surface.

GVR_AUDIO_MATERIAL_SHEET_ROCK

Sheet rock.

GVR_AUDIO_MATERIAL_TRANSPARENT

Acoustically transparent material, reflects no sound.

GVR_AUDIO_MATERIAL_WATER_OR_ICE_SURFACE

Surface of water or ice.

GVR_AUDIO_MATERIAL_WOOD_CEILING

Wooden ceiling.

GVR_AUDIO_MATERIAL_WOOD_PANEL

Wood paneling.

gvr_audio_rendering_mode

 gvr_audio_rendering_mode

Rendering modes define CPU load / rendering quality balances.

Properties
GVR_AUDIO_RENDERING_BINAURAL_HIGH_QUALITY

HRTF-based rendering over a virtual array of 16 loudspeakers arranged in an approximate equidistribution about the around the listener’s head.

GVR_AUDIO_RENDERING_BINAURAL_LOW_QUALITY

HRTF-based rendering over a virtual array of 8 loudspeakers arranged in a cube configuration around the listener’s head.

GVR_AUDIO_RENDERING_STEREO_PANNING

Stereo panning of all Sound Objects. This disables HRTF-based rendering.

gvr_audio_surround_format_type

 gvr_audio_surround_format_type

Supported surround sound formats.

gvr_color_format_type

 gvr_color_format_type

Valid color formats for swap chain buffers.

Properties
GVR_COLOR_FORMAT_RGBA_8888

Equivalent to GL_RGBA8.

GVR_COLOR_FORMAT_RGB_565

Equivalent to GL_RGB565.

gvr_controller_api_status

 gvr_controller_api_status

Constants that represent the status of the controller API.

Properties
GVR_CONTROLLER_API_CLIENT_OBSOLETE

The underlying VR service is too new, is incompatible with current client.

GVR_CONTROLLER_API_MALFUNCTION

The underlying VR service is malfunctioning. Try again later.

GVR_CONTROLLER_API_NOT_AUTHORIZED

This app was not authorized to use the service (e.g., missing permissions, the app is blacklisted by the underlying service, etc).

GVR_CONTROLLER_API_OK

API is happy and healthy.

This doesn't mean the controller itself is connected, it just means that the underlying service is working properly.

GVR_CONTROLLER_API_SERVICE_OBSOLETE

The underlying VR service is too old, needs upgrade.

GVR_CONTROLLER_API_UNAVAILABLE

The underlying VR service is not present.

GVR_CONTROLLER_API_UNSUPPORTED

Any other status represents a permanent failure that requires external action to fix:

API failed because this device does not support controllers (API is too low, or other required feature not present).

gvr_controller_battery_level

 gvr_controller_battery_level

Controller battery states.

Properties
GVR_CONTROLLER_BATTERY_LEVEL_COUNT

Note: there are 5 distinct levels, but there are 6 due to the inclusion of an UNKNOWN state before any battery information is collected, etc.

gvr_controller_button

 gvr_controller_button

Controller buttons.

Properties
GVR_CONTROLLER_BUTTON_CLICK

Touchpad Click.

GVR_CONTROLLER_BUTTON_COUNT

Note: there are 5 buttons on the controller, but the state arrays have this many elements due to the inclusion of a dummy "none" button.

gvr_controller_connection_state

 gvr_controller_connection_state

Constants that represent the state of the controller.

Properties
GVR_CONTROLLER_CONNECTED

Controller is connected.

GVR_CONTROLLER_CONNECTING

Controller is connecting.

GVR_CONTROLLER_DISCONNECTED

Controller is disconnected.

GVR_CONTROLLER_SCANNING

Controller is scanning.

gvr_controller_handedness

 gvr_controller_handedness

gvr_depth_stencil_format_type

 gvr_depth_stencil_format_type
Properties
GVR_DEPTH_STENCIL_FORMAT_DEPTH_16

Equivalent to GL_DEPTH_COMPONENT16.

GVR_DEPTH_STENCIL_FORMAT_DEPTH_24

Equivalent to GL_DEPTH_COMPONENT24.

GVR_DEPTH_STENCIL_FORMAT_DEPTH_24_STENCIL_8

Equivlaent to GL_DEPTH24_STENCIL8.

GVR_DEPTH_STENCIL_FORMAT_DEPTH_32_F

Equivalent to GL_DEPTH_COMPONENT32F.

GVR_DEPTH_STENCIL_FORMAT_DEPTH_32_F_STENCIL_8

Equivalent to GL_DEPTH_32F_STENCIL8.

GVR_DEPTH_STENCIL_FORMAT_NONE

No depth or stencil buffer.

GVR_DEPTH_STENCIL_FORMAT_STENCIL_8

Equivalent to GL_STENCIL8.

gvr_error

 gvr_error

Constants that represent GVR error codes.

gvr_eye

 gvr_eye

An enum for the left and right eye.

gvr_feature

 gvr_feature

gvr_reprojection

 gvr_reprojection

Types of asynchronous reprojection.

Properties
GVR_REPROJECTION_FULL

Reproject in all dimensions.

GVR_REPROJECTION_NONE

Do not reproject.

gvr_viewer_type

 gvr_viewer_type

The type of VR viewer.

Properties
GVR_VIEWER_TYPE_CARDBOARD

A Cardboard-compatible viewer.

A typical Cardboard viewer supports a simple touchscreen-based trigger input mechanism. On most platforms, this

GVR_VIEWER_TYPE_DAYDREAM

A Daydream-compatible viewer.

A typical Daydream viewer supports 3DOF controller input (as defined in gvr_controller.h), and is intended only for Daydream-ready platforms. It does not support touchscreen-based input unless Cardboard emulation is explicitly enabled.

Typedefs

gvr_audio_source_id

int32_t gvr_audio_source_id

Sound object and sound field identifier.

gvr_context

struct gvr_context_ gvr_context

Primary context for invoking Google VR APIs.

gvr_user_prefs

struct gvr_user_prefs_ gvr_user_prefs