SRSDK  0.10.39
Loading...
Searching...
No Matches
Interlacer

Interlacing on Leia devices. More...

Modules

 D3D11 Interlacer
 D3D11 interlacing on Leia devices.
 
 D3D12 Interlacer
 D3D12 interlacing on Leia devices.
 
 OpenGL Interlacer
 OpenGL interlacing on Leia devices.
 
 Vulkan Interlacer
 Vulkan interlacing on Leia devices.
 

Namespaces

namespace  leia
 

Data Structures

struct  leia_interlacer
 The main entity used for performing interlacing on Leia devices. More...
 
struct  leia_interlacer_init_configuration
 leia_interlacer's initial configuration. More...
 
struct  leia_interlacer_gui_configuration
 
struct  leia_interlacer_single_view_mode_listener
 

Macros

#define leia_interlacer_enable_act_VERSION   (1)
 
#define leia_interlacer_is_act_enabled_VERSION   (1)
 
#define leia_interlacer_init_zone_plate_VERSION   (1)
 
#define leia_interlacer_set_zone_plate_VERSION   (1)
 
#define leia_interlacer_get_zone_plate_results_VERSION   (3)
 
#define leia_interlacer_set_support_circle_phase_VERSION   (1)
 
#define leia_interlacer_write_zone_plate_results_VERSION   (3)
 
#define leia_interlacer_set_camera_rectification_parameters_VERSION   (2)
 
#define leia_interlacer_set_camera_angles_VERSION   (2)
 
#define leia_interlacer_set_dovern_VERSION   (1)
 
#define leia_interlacer_enable_phase_correction_VERSION   (1)
 
#define leia_interlacer_invert_phase_correction_VERSION   (1)
 
#define leia_interlacer_enable_don_correction_VERSION   (1)
 
#define leia_interlacer_set_n_VERSION   (1)
 
#define leia_interlacer_set_act_coef_VERSION   (1)
 
#define leia_interlacer_get_act_coef_VERSION   (1)
 
#define leia_interlacer_initialize_gui_VERSION   (1)
 
#define leia_interlacer_set_gui_visibility_VERSION   (1)
 
#define leia_interlacer_is_gui_visible_VERSION   (1)
 
#define leia_interlacer_process_gui_input_wndproc_VERSION   (1)
 
#define leia_interlacer_process_gui_input_ndk_VERSION   (1)
 
#define leia_interlacer_process_gui_motion_input_VERSION   (1)
 
#define leia_interlacer_shutdown_gui_VERSION   (1)
 
#define leia_interlacer_set_calibration_pattern_VERSION   (1)
 
#define leia_interlacer_set_gamma_VERSION   (1)
 

Typedefs

typedef void(* leia_interlacer_enable_act) (struct leia_interlacer *, leia_bool enable)
 Enable or disable Anti-crosstalk.
 
typedef leia_bool(* leia_interlacer_is_act_enabled) (struct leia_interlacer *)
 Gets whether anti-crosstalk is enabled or not.
 
typedef leia_bool(* leia_interlacer_init_zone_plate) (struct leia_interlacer *, int32_t viewportWidth, int32_t viewportHeight, float *posX, float *posY, float *scaleX, float *scaleY, float *overrideSupportCirclePhase)
 Init zone plate.
 
typedef void(* leia_interlacer_set_zone_plate) (struct leia_interlacer *, float posX, float posY, float scaleX, float scaleY, float overrideSupportCirclePhase)
 Set the origin and scale of the zoom plate.
 
typedef leia_bool(* leia_interlacer_get_zone_plate_results) (struct leia_interlacer *, float *slant, float *pitch, float *phc, float *dOverN, float *n)
 
typedef void(* leia_interlacer_set_support_circle_phase) (struct leia_interlacer *, float phase)
 
typedef leia_bool(* leia_interlacer_write_zone_plate_results) (struct leia_interlacer *, float slant, float pitch, float phc, float dOverN, float n)
 
typedef void(* leia_interlacer_set_camera_rectification_parameters) (struct leia_interlacer *, leia_bool isFront, float deltaThetaX, float deltaThetaY, float deltaThetaZ, float calibrationTargetDistanceMm)
 
typedef void(* leia_interlacer_set_camera_angles) (struct leia_interlacer *, leia_bool isLeft, float thetaXFpc, float thetaYFpc, float thetaZFpc)
 
typedef void(* leia_interlacer_set_dovern) (struct leia_interlacer *, float dOverN)
 
typedef void(* leia_interlacer_enable_phase_correction) (struct leia_interlacer *, leia_bool enable)
 
typedef void(* leia_interlacer_invert_phase_correction) (struct leia_interlacer *, leia_bool invert)
 
typedef void(* leia_interlacer_enable_don_correction) (struct leia_interlacer *, leia_bool enable)
 
typedef void(* leia_interlacer_set_n) (struct leia_interlacer *, float n)
 
typedef void(* leia_interlacer_set_act_coef) (struct leia_interlacer *, float n)
 
typedef float(* leia_interlacer_get_act_coef) (struct leia_interlacer *)
 
typedef void(* leia_interlacer_initialize_gui) (struct leia_interlacer *, struct leia_interlacer_debug_menu_configuration const *config, leia_bool sRGB)
 Initializes and enables use of a debug GUI.
 
typedef void(* leia_interlacer_set_gui_visibility) (struct leia_interlacer *, leia_bool isVisible)
 Set whether the GUI is visible.
 
typedef leia_bool(* leia_interlacer_is_gui_visible) (struct leia_interlacer *)
 Gets whether we the GUI is visible.
 
typedef struct leia_interlacer_gui_input_state(* leia_interlacer_process_gui_input_wndproc) (struct leia_interlacer *, void *surface, uint32_t msg, uint64_t wparam, int64_t lparam)
 Process user-input for the GUI.
 
typedef struct leia_interlacer_gui_input_state(* leia_interlacer_process_gui_input_ndk) (struct leia_interlacer *, struct AInputEvent const *inputEvent)
 Process user-input for the GUI.
 
typedef struct leia_interlacer_gui_input_state(* leia_interlacer_process_gui_motion_input) (struct leia_interlacer *, JNIEnv *jni, jobject motionInput)
 Process user-input for the GUI.
 
typedef void(* leia_interlacer_shutdown_gui) (struct leia_interlacer *)
 Shutdown the GUI.
 
typedef void(* leia_interlacer_set_calibration_pattern) (struct leia_interlacer *, enum leia_calibration_pattern pattern)
 Sets the calibration pattern.
 
typedef void(* leia_interlacer_set_gamma) (struct leia_interlacer *, float rGamma, float gGamma, float bGamma)
 Set the gamma value during interlacing.
 

Enumerations

enum  { LEIA_INTERLACER_MAX_LAYERS = 16 , LEIA_INTERLACER_MAX_VIEWS = 12 }
 

Functions

LEIA_NODISCARD LEIASDK_API struct leia_interlacer_init_configurationleia_interlacer_init_configuration_alloc ()
 
LEIASDK_API void leia_interlacer_init_configuration_set_is_protected (struct leia_interlacer_init_configuration *, leia_bool)
 Whether we are using a protected OpenGL context.
 
LEIASDK_API void leia_interlacer_init_configuration_set_use_atlas_for_views (struct leia_interlacer_init_configuration *, leia_bool)
 If we should use atlas by default.
 
LEIASDK_API void leia_interlacer_init_configuration_free (struct leia_interlacer_init_configuration *)
 
LEIASDK_API float leia_interlacer_get_phc (struct leia_interlacer *)
 
LEIASDK_API void leia_interlacer_set_phc (struct leia_interlacer *, float phase)
 
LEIASDK_API void leia_interlacer_set_enable_user_matrix (struct leia_interlacer *interlacer, leia_bool enabled)
 
LEIASDK_API void leia_interlacer_get_user_matrix (struct leia_interlacer *interlacer, LEIA_FLOAT_SLICE(16) transformMatrix)
 
LEIASDK_API void leia_interlacer_set_user_matrix (struct leia_interlacer *interlacer, LEIA_CONST_FLOAT_SLICE(16) transformMatrix)
 
LEIASDK_API void leia_interlacer_retain (struct leia_interlacer *)
 Increment leia_interlacer reference count.
 
LEIASDK_API void leia_interlacer_release (struct leia_interlacer *)
 Decrement leia_interlacer reference count.
 
LEIASDK_API int32_t leia_interlacer_get_max_layer_count (struct leia_interlacer *)
 Gets the max number of layers that can be interlaced at once.
 
LEIASDK_API int32_t leia_interlacer_get_max_view_count (struct leia_interlacer *)
 Gets the max number of views per layer that can be interlaced at once.
 
LEIASDK_API void leia_interlacer_set_layer_count (struct leia_interlacer *, int layerCount)
 Sets the number of layers to interlace.
 
LEIA_NODISCARD LEIASDK_API int leia_interlacer_get_layer_count (struct leia_interlacer *)
 Gets the current number of layers.
 
LEIASDK_API void leia_interlacer_set_num_tiles (struct leia_interlacer *, int32_t tx, int32_t ty)
 Set the layout of views in a atlas.
 
LEIASDK_API void leia_interlacer_get_num_tiles (struct leia_interlacer *, int32_t *tx, int32_t *ty)
 Get the layout of views in the atlas.
 
LEIASDK_API void leia_interlacer_set_tile_layout (struct leia_interlacer *, enum leia_tile_layout tileLayout)
 Set the layout of the tiles in the atlas.
 
LEIASDK_API void leia_interlacer_output_as_tiles (struct leia_interlacer *, leia_bool enable)
 Enable or disable output of raw source tiles.
 
LEIASDK_API void leia_interlacer_set_baseline_scaling (struct leia_interlacer *, float baseline)
 Sets the baseline scaling.
 
LEIA_NODISCARD LEIASDK_API float leia_interlacer_get_baseline_scaling (struct leia_interlacer *)
 Get the baseline scaling.
 
LEIA_NODISCARD LEIASDK_API float leia_interlacer_get_convergence_distance (struct leia_interlacer *)
 Get the convergence distance.
 
LEIASDK_API void leia_interlacer_set_convergence_distance (struct leia_interlacer *, float distance)
 Set the convergence distance.
 
LEIASDK_API void leia_interlacer_get_converged_orthographic_view_info (struct leia_interlacer *, int32_t viewIndex, LEIA_CONST_FLOAT_SLICE(3) cameraPos, LEIA_CONST_FLOAT_SLICE(3) cameraDir, LEIA_CONST_FLOAT_SLICE(3) cameraUp, float width, float height, float nearPlane, float farPlane, LEIA_FLOAT_SLICE(3) viewPos, LEIA_FLOAT_SLICE(16) viewProjectionMatrix, float *viewShearX, float *viewShearY)
 Retrieve information related to a view.
 
LEIASDK_API void leia_interlacer_get_converged_perspective_view_info (struct leia_interlacer *, int32_t viewIndex, LEIA_CONST_FLOAT_SLICE(3) cameraPos, LEIA_CONST_FLOAT_SLICE(3) cameraDir, LEIA_CONST_FLOAT_SLICE(3) cameraUp, float fieldOfView, float aspectRatio, float nearPlane, float farPlane, LEIA_FLOAT_SLICE(3) viewPos, LEIA_FLOAT_SLICE(16) viewProjectionMatrix, float *viewFieldOfView, float *viewShearX, float *viewShearY)
 Retrieve information related to a view.
 
LEIASDK_API void leia_interlacer_set_fit_mode (struct leia_interlacer *, enum leia_fit_mode mode)
 Set the fit mode.
 
LEIA_NODISCARD LEIASDK_API enum leia_fit_mode leia_interlacer_get_fit_mode (struct leia_interlacer *)
 Get the fit mode.
 
LEIASDK_API void leia_interlacer_get_rect_matrix (struct leia_interlacer *, LEIA_FLOAT_SLICE(16) transformMatrix)
 Get the rect matrix.
 
LEIASDK_API void leia_interlacer_set_local_matrix (struct leia_interlacer *, LEIA_CONST_FLOAT_SLICE(16) transformMatrix)
 Set the local matrix.
 
LEIASDK_API void leia_interlacer_set_custom_texture_matrix (struct leia_interlacer *, LEIA_CONST_FLOAT_SLICE(16) textureTransform)
 Set the custom texture matrix.
 
LEIASDK_API void leia_interlacer_set_alpha (struct leia_interlacer *, float alpha)
 Sets the alpha blending value.
 
LEIASDK_API void leia_interlacer_set_flip_input_uv_vertical (struct leia_interlacer *, leia_bool flip)
 Set whether to flip the views vertically.
 
LEIASDK_API void leia_interlacer_set_single_view_mode (struct leia_interlacer *, leia_bool setSingleView, int32_t singleViewIndex)
 Set single-view interlacing mode.
 
LEIASDK_API void leia_interlacer_set_single_view_mode_listener (struct leia_interlacer *, struct leia_interlacer_single_view_mode_listener const *listener)
 Set single-view mode callback.
 
LEIASDK_API void leia_interlacer_set_source_views_size (struct leia_interlacer *, int32_t sourceWidth, int32_t sourceHeight, leia_bool isHorizontalViews)
 Set dimensions of the views.
 
LEIASDK_API void leia_interlacer_get_source_views_size (struct leia_interlacer *, int32_t *sourceWidth, int32_t *sourceHeight, leia_bool *isHorizontalViews)
 Get dimensions of the views previously set via leia_interlacer_set_source_views_size.
 
LEIASDK_API void leia_interlacer_set_source_media_is_video (struct leia_interlacer *, leia_bool isVideo)
 Set whether source media is a video or not.
 
LEIASDK_API void leia_interlacer_set_source_media_scale (struct leia_interlacer *, float scaleX, float scaleY)
 Set source media scale factors.
 
LEIASDK_API void leia_interlacer_set_source_views_srgb (struct leia_interlacer *, leia_bool isSRGB)
 Set whether view textures are in a sRGB format.
 
LEIASDK_API void leia_interlacer_set_in_shader_srgb_conversion (struct leia_interlacer *, leia_bool sRGBRead, leia_bool sRGBWrite)
 Set whether to sRGB conversions are enabled or disabled in the interlacing shader.
 
LEIASDK_API void leia_interlacer_set_viewport_screen_position (struct leia_interlacer *, int32_t posX, int32_t posY)
 Set the viewport screen position.
 
LEIASDK_API void leia_interlacer_set_viewport (struct leia_interlacer *, int32_t posX, int32_t posY, int32_t width, int32_t height)
 Set the viewport.
 
LEIASDK_API void leia_interlacer_enable_reconvergence (struct leia_interlacer *, leia_bool enable)
 Enable or disable reconvergence.
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_interlacer_is_reconvergence_enabled (struct leia_interlacer *)
 Gets whether we are using reconvergence.
 
LEIA_NODISCARD LEIASDK_API float leia_interlacer_get_reconvergence (struct leia_interlacer *, int layer)
 Get the reconvergence amount.
 
LEIASDK_API void leia_interlacer_set_reconvergence (struct leia_interlacer *, float value, int layer)
 Set the reconvergence amount.
 
LEIASDK_API void leia_interlacer_set_reconvergence_zoom (struct leia_interlacer *, leia_bool zoomX, leia_bool zoomXY, int layer)
 Set what directions reconvergence is calculated for.
 
LEIASDK_API void leia_interlacer_set_use_atlas_for_views (struct leia_interlacer *, leia_bool)
 Set whether the views are a single atlas vs individual textures.
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_interlacer_get_use_atlas_for_views (struct leia_interlacer *)
 Gets whether we are using a single atlas or individual views.
 
LEIASDK_API void leia_interlacer_get_view_offset (struct leia_interlacer *, int32_t view, LEIA_FLOAT_SLICE(3) offset)
 Gets a view offset.
 
LEIASDK_API void leia_interlacer_set_invert_screen_texture_coordinates (struct leia_interlacer *, leia_bool invert)
 Set whether to invert screen texture coordinates vertically.
 
LEIA_NODISCARD LEIASDK_API enum leia_graphics_api leia_interlacer_get_graphics_api (struct leia_interlacer *)
 Get the graphics API.
 
LEIASDK_API void leia_get_view_comfort_zone (enum leia_view_info_mode mode, float baselineScaling, float convergencePlaneDistance, float nearPlane, float farPlane, float *viewComfortZoneNear, float *viewComfortZoneFar)
 A helper function to compute comfort zone range.
 
LEIASDK_API void leia_get_view_info (enum leia_view_info_mode mode, LEIA_CONST_FLOAT_SLICE(3) viewOffset, LEIA_CONST_FLOAT_SLICE(3) cameraPos, LEIA_CONST_FLOAT_SLICE(3) cameraDir, LEIA_CONST_FLOAT_SLICE(3) cameraUp, float perspectiveFieldOfView, float perspectiveAspectRatio, float orthoWidth, float orthoHeight, float nearPlane, float farPlane, float convergencePlaneDistance, float convergencePlaneHeight, LEIA_FLOAT_SLICE(3) viewPos, LEIA_FLOAT_SLICE(16) viewProjectionMatrix, float *viewFieldOfView, float *viewShearX, float *viewShearY)
 A helper function to compute per-view values.
 

Detailed Description

Interlacing on Leia devices.

Macro Definition Documentation

◆ leia_interlacer_enable_act_VERSION

#define leia_interlacer_enable_act_VERSION   (1)

◆ leia_interlacer_is_act_enabled_VERSION

#define leia_interlacer_is_act_enabled_VERSION   (1)

◆ leia_interlacer_init_zone_plate_VERSION

#define leia_interlacer_init_zone_plate_VERSION   (1)

◆ leia_interlacer_set_zone_plate_VERSION

#define leia_interlacer_set_zone_plate_VERSION   (1)

◆ leia_interlacer_get_zone_plate_results_VERSION

#define leia_interlacer_get_zone_plate_results_VERSION   (3)

◆ leia_interlacer_set_support_circle_phase_VERSION

#define leia_interlacer_set_support_circle_phase_VERSION   (1)

◆ leia_interlacer_write_zone_plate_results_VERSION

#define leia_interlacer_write_zone_plate_results_VERSION   (3)

◆ leia_interlacer_set_camera_rectification_parameters_VERSION

#define leia_interlacer_set_camera_rectification_parameters_VERSION   (2)

◆ leia_interlacer_set_camera_angles_VERSION

#define leia_interlacer_set_camera_angles_VERSION   (2)

◆ leia_interlacer_set_dovern_VERSION

#define leia_interlacer_set_dovern_VERSION   (1)

◆ leia_interlacer_enable_phase_correction_VERSION

#define leia_interlacer_enable_phase_correction_VERSION   (1)

◆ leia_interlacer_invert_phase_correction_VERSION

#define leia_interlacer_invert_phase_correction_VERSION   (1)

◆ leia_interlacer_enable_don_correction_VERSION

#define leia_interlacer_enable_don_correction_VERSION   (1)

◆ leia_interlacer_set_n_VERSION

#define leia_interlacer_set_n_VERSION   (1)

◆ leia_interlacer_set_act_coef_VERSION

#define leia_interlacer_set_act_coef_VERSION   (1)

◆ leia_interlacer_get_act_coef_VERSION

#define leia_interlacer_get_act_coef_VERSION   (1)

◆ leia_interlacer_initialize_gui_VERSION

#define leia_interlacer_initialize_gui_VERSION   (1)

◆ leia_interlacer_set_gui_visibility_VERSION

#define leia_interlacer_set_gui_visibility_VERSION   (1)

◆ leia_interlacer_is_gui_visible_VERSION

#define leia_interlacer_is_gui_visible_VERSION   (1)

◆ leia_interlacer_process_gui_input_wndproc_VERSION

#define leia_interlacer_process_gui_input_wndproc_VERSION   (1)

◆ leia_interlacer_process_gui_input_ndk_VERSION

#define leia_interlacer_process_gui_input_ndk_VERSION   (1)

◆ leia_interlacer_process_gui_motion_input_VERSION

#define leia_interlacer_process_gui_motion_input_VERSION   (1)

◆ leia_interlacer_shutdown_gui_VERSION

#define leia_interlacer_shutdown_gui_VERSION   (1)

◆ leia_interlacer_set_calibration_pattern_VERSION

#define leia_interlacer_set_calibration_pattern_VERSION   (1)

◆ leia_interlacer_set_gamma_VERSION

#define leia_interlacer_set_gamma_VERSION   (1)

Typedef Documentation

◆ leia_interlacer_enable_act

typedef void(* leia_interlacer_enable_act) (struct leia_interlacer *, leia_bool enable)

Enable or disable Anti-crosstalk.

Use this method to enable or disable anti-crosstalk. When enabled, the interlaced image result will have reduced crosstalk artifacts.

See also
leia_interlacer_is_act_enabled
Parameters
enableWhether to enable or disable ACT.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_is_act_enabled

typedef leia_bool(* leia_interlacer_is_act_enabled) (struct leia_interlacer *)

Gets whether anti-crosstalk is enabled or not.

See also
leia_interlacer_enable_act
Returns
Whether anti-crosstalk is enabled.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_init_zone_plate

typedef leia_bool(* leia_interlacer_init_zone_plate) (struct leia_interlacer *, int32_t viewportWidth, int32_t viewportHeight, float *posX, float *posY, float *scaleX, float *scaleY, float *overrideSupportCirclePhase)

Init zone plate.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_set_zone_plate

typedef void(* leia_interlacer_set_zone_plate) (struct leia_interlacer *, float posX, float posY, float scaleX, float scaleY, float overrideSupportCirclePhase)

Set the origin and scale of the zoom plate.

Use this method to set the zoom plate, i.e. the raw values for zoom & pan gesture handling

Parameters
[in]posX,posY,scaleX,scaleYThe raw x, y, absoluteZoomX, absoluteZoomY

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_get_zone_plate_results

typedef leia_bool(* leia_interlacer_get_zone_plate_results) (struct leia_interlacer *, float *slant, float *pitch, float *phc, float *dOverN, float *n)

◆ leia_interlacer_set_support_circle_phase

typedef void(* leia_interlacer_set_support_circle_phase) (struct leia_interlacer *, float phase)

◆ leia_interlacer_write_zone_plate_results

typedef leia_bool(* leia_interlacer_write_zone_plate_results) (struct leia_interlacer *, float slant, float pitch, float phc, float dOverN, float n)

◆ leia_interlacer_set_camera_rectification_parameters

typedef void(* leia_interlacer_set_camera_rectification_parameters) (struct leia_interlacer *, leia_bool isFront, float deltaThetaX, float deltaThetaY, float deltaThetaZ, float calibrationTargetDistanceMm)

◆ leia_interlacer_set_camera_angles

typedef void(* leia_interlacer_set_camera_angles) (struct leia_interlacer *, leia_bool isLeft, float thetaXFpc, float thetaYFpc, float thetaZFpc)

◆ leia_interlacer_set_dovern

typedef void(* leia_interlacer_set_dovern) (struct leia_interlacer *, float dOverN)

◆ leia_interlacer_enable_phase_correction

typedef void(* leia_interlacer_enable_phase_correction) (struct leia_interlacer *, leia_bool enable)

◆ leia_interlacer_invert_phase_correction

typedef void(* leia_interlacer_invert_phase_correction) (struct leia_interlacer *, leia_bool invert)

◆ leia_interlacer_enable_don_correction

typedef void(* leia_interlacer_enable_don_correction) (struct leia_interlacer *, leia_bool enable)

◆ leia_interlacer_set_n

typedef void(* leia_interlacer_set_n) (struct leia_interlacer *, float n)

◆ leia_interlacer_set_act_coef

typedef void(* leia_interlacer_set_act_coef) (struct leia_interlacer *, float n)

◆ leia_interlacer_get_act_coef

typedef float(* leia_interlacer_get_act_coef) (struct leia_interlacer *)

◆ leia_interlacer_initialize_gui

typedef void(* leia_interlacer_initialize_gui) (struct leia_interlacer *, struct leia_interlacer_debug_menu_configuration const *config, leia_bool sRGB)

Initializes and enables use of a debug GUI.

Use this method to enable rendering a debug GUI on top of the interlaced result. This can be useful for testing and debugging. The GUI is interactive and allows the user to view and modify many options.

See also
leia_interlacer_set_gui_visibility, leia_interlacer_is_gui_visible
Parameters
[in]configArguments for the debug menu, see leia_interlacer_debug_menu_configuration.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_set_gui_visibility

typedef void(* leia_interlacer_set_gui_visibility) (struct leia_interlacer *, leia_bool isVisible)

Set whether the GUI is visible.

Use this method to make the GUI visible or not.

See also
leia_interlacer_is_gui_visible, leia_interlacer_initialize_gui
Parameters
[in]isVisibleWhether to show or hide GUI.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_is_gui_visible

typedef leia_bool(* leia_interlacer_is_gui_visible) (struct leia_interlacer *)

Gets whether we the GUI is visible.

See also
leia_interlacer_set_gui_visibility, leia_interlacer_initialize_gui
Returns
If the GUI is initialized and visible.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_process_gui_input_wndproc

typedef struct leia_interlacer_gui_input_state(* leia_interlacer_process_gui_input_wndproc) (struct leia_interlacer *, void *surface, uint32_t msg, uint64_t wparam, int64_t lparam)

Process user-input for the GUI.

When the GUI is enabled, we need to process user input (keyboard, mouse, touch) to drive the interface. Call this method when you receive window messages in your WNDPROC callback.

Parameters
[in]surfaceThe hWnd value from the WNDPROC.
[in]msgThe uMsg value from the WNDPROC.
[in]wParamThe uMsg value from the WNDPROC.
[in]lParamThe uMsg value from the WNDPROC.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_process_gui_input_ndk

typedef struct leia_interlacer_gui_input_state(* leia_interlacer_process_gui_input_ndk) (struct leia_interlacer *, struct AInputEvent const *inputEvent)

Process user-input for the GUI.

When the GUI is enabled, we need to process user input (keyboard, mouse, touch) to drive the interface. Call this method when your Android app receives an input event.

Parameters
[in]inputEventThe received AInputEvent.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_process_gui_motion_input

typedef struct leia_interlacer_gui_input_state(* leia_interlacer_process_gui_motion_input) (struct leia_interlacer *, JNIEnv *jni, jobject motionInput)

Process user-input for the GUI.

When the GUI is enabled, we need to process user input (keyboard, mouse, touch) to drive the interface. Call this method when your Android app receives a motion input event.

Parameters
[in]jniThe JNI environment structure for the application.
[in]motionInputThe received motion input.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_shutdown_gui

typedef void(* leia_interlacer_shutdown_gui) (struct leia_interlacer *)

Shutdown the GUI.

Use this method when you are finished with the GUI.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_set_calibration_pattern

typedef void(* leia_interlacer_set_calibration_pattern) (struct leia_interlacer *, enum leia_calibration_pattern pattern)

Sets the calibration pattern.

This method allows setting calibration pattern. This can be used to calibrate Leia devices but also to visually inspect and verify if a display is calibrated correctly.

Parameters
[in]patternThe calibration pattern to set.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_interlacer_set_gamma

typedef void(* leia_interlacer_set_gamma) (struct leia_interlacer *, float rGamma, float gGamma, float bGamma)

Set the gamma value during interlacing.

Parameters
[in]rGammaRed component of gamma.
[in]gGammaGreen component of gamma.
[in]bGammaBlue component of gamma.

It's an experimental API, see leia_get_experimental_api for more info.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LEIA_INTERLACER_MAX_LAYERS 

A compile-time hint, use leia_interlacer_get_max_layer_count to get the actual value.

LEIA_INTERLACER_MAX_VIEWS 

A compile-time hint, use leia_interlacer_get_max_view_count to get the actual value.

Function Documentation

◆ leia_interlacer_init_configuration_alloc()

LEIA_NODISCARD LEIASDK_API struct leia_interlacer_init_configuration * leia_interlacer_init_configuration_alloc ( )

◆ leia_interlacer_init_configuration_set_is_protected()

LEIASDK_API void leia_interlacer_init_configuration_set_is_protected ( struct leia_interlacer_init_configuration ,
leia_bool   
)

Whether we are using a protected OpenGL context.

◆ leia_interlacer_init_configuration_set_use_atlas_for_views()

LEIASDK_API void leia_interlacer_init_configuration_set_use_atlas_for_views ( struct leia_interlacer_init_configuration ,
leia_bool   
)

If we should use atlas by default.

◆ leia_interlacer_init_configuration_free()

LEIASDK_API void leia_interlacer_init_configuration_free ( struct leia_interlacer_init_configuration )

◆ leia_interlacer_get_phc()

LEIASDK_API float leia_interlacer_get_phc ( struct leia_interlacer )

◆ leia_interlacer_set_phc()

LEIASDK_API void leia_interlacer_set_phc ( struct leia_interlacer ,
float  phase 
)

◆ leia_interlacer_set_enable_user_matrix()

LEIASDK_API void leia_interlacer_set_enable_user_matrix ( struct leia_interlacer interlacer,
leia_bool  enabled 
)

◆ leia_interlacer_get_user_matrix()

LEIASDK_API void leia_interlacer_get_user_matrix ( struct leia_interlacer interlacer,
LEIA_FLOAT_SLICE(16)  transformMatrix 
)

◆ leia_interlacer_set_user_matrix()

LEIASDK_API void leia_interlacer_set_user_matrix ( struct leia_interlacer interlacer,
LEIA_CONST_FLOAT_SLICE(16)  transformMatrix 
)

◆ leia_interlacer_retain()

LEIASDK_API void leia_interlacer_retain ( struct leia_interlacer )

Increment leia_interlacer reference count.

◆ leia_interlacer_release()

LEIASDK_API void leia_interlacer_release ( struct leia_interlacer )

Decrement leia_interlacer reference count.

Frees resources when its reference count reaches 0.

◆ leia_interlacer_get_max_layer_count()

LEIASDK_API int32_t leia_interlacer_get_max_layer_count ( struct leia_interlacer )

Gets the max number of layers that can be interlaced at once.

◆ leia_interlacer_get_max_view_count()

LEIASDK_API int32_t leia_interlacer_get_max_view_count ( struct leia_interlacer )

Gets the max number of views per layer that can be interlaced at once.

◆ leia_interlacer_set_layer_count()

LEIASDK_API void leia_interlacer_set_layer_count ( struct leia_interlacer ,
int  layerCount 
)

Sets the number of layers to interlace.

Use this method to set the number of layers you want to be interlaced.

See also
leia_interlacer_get_layer_count
Parameters
layerCountNumber of layers.

◆ leia_interlacer_get_layer_count()

LEIA_NODISCARD LEIASDK_API int leia_interlacer_get_layer_count ( struct leia_interlacer )

Gets the current number of layers.

See also
leia_interlacer_set_layer_count
Returns
The number of layers that will be interlaced.

◆ leia_interlacer_set_num_tiles()

LEIASDK_API void leia_interlacer_set_num_tiles ( struct leia_interlacer ,
int32_t  tx,
int32_t  ty 
)

Set the layout of views in a atlas.

If you are using a atlas for views, the views are laid-out in a certain format. By default a stereo 2x1 left/right format is used. Use this method to override to any view layout.

See also
leia_interlacer_get_num_tiles
Parameters
[in]txNumber of views horizontally.
[in]tyNumber of views vertically.

◆ leia_interlacer_get_num_tiles()

LEIASDK_API void leia_interlacer_get_num_tiles ( struct leia_interlacer ,
int32_t *  tx,
int32_t *  ty 
)

Get the layout of views in the atlas.

When rendering multiple views to a single atlas, they are laid-out in a certain way. By default we use a stereo 2x1 layout. Use this method to retrieve the set layout.

See also
leia_interlacer_set_num_tiles
Parameters
[out]txNumber of horizontal views.
[out]tyNumber of vertical views.

◆ leia_interlacer_set_tile_layout()

LEIASDK_API void leia_interlacer_set_tile_layout ( struct leia_interlacer ,
enum leia_tile_layout  tileLayout 
)

Set the layout of the tiles in the atlas.

The layout describes the default order-of-traversal of the tile-grid in the atlas. Options are: left-to-right or right-to-left top-down or bottom-up (DOWN or UP) row-major or column-major Default is: LEIA_TILE_LAYOUT_LEFT_TO_RIGHT_DOWN_ROW_MAJOR

See also
leia_interlacer_set_num_tiles
Parameters
[in]tileLayoutLayout of tiles.

◆ leia_interlacer_output_as_tiles()

LEIASDK_API void leia_interlacer_output_as_tiles ( struct leia_interlacer ,
leia_bool  enable 
)

Enable or disable output of raw source tiles.

Use this method to view either the raw tiled SBS source media or the interlaced image result.

Parameters
enableWhether to enable or disable viewing the source tiles.

◆ leia_interlacer_set_baseline_scaling()

LEIASDK_API void leia_interlacer_set_baseline_scaling ( struct leia_interlacer ,
float  baseline 
)

Sets the baseline scaling.

Use this method to set the baseline scaling value. The baseline scaling value determines the horizontal view camera spacing and hence the strength of the 3D effect in the interlaced result.

See also
leia_interlacer_get_baseline_scaling
Parameters
[in]baselineThe baseline scaling to use.

◆ leia_interlacer_get_baseline_scaling()

LEIA_NODISCARD LEIASDK_API float leia_interlacer_get_baseline_scaling ( struct leia_interlacer )

Get the baseline scaling.

Use this method to retrieve the baseline scaling value set via leia_interlacer_set_baseline_scaling(). The baseline scaling value determines the horizontal view camera spacing and hence the strength of the 3D effect in the interlaced result.

See also
leia_interlacer_set_baseline_scaling
Returns
The current baseline scaling.

◆ leia_interlacer_get_convergence_distance()

LEIA_NODISCARD LEIASDK_API float leia_interlacer_get_convergence_distance ( struct leia_interlacer )

Get the convergence distance.

Use this method to retrieve the convergence distance value set via leia_interlacer_set_convergence_distance(). The convergence distance value determines the distance at which objects appear directly on the display. Objects closer than the convergence distance appear to float in front of the display and objects farther than the convergence distance appear to be inside the display.

See also
leia_interlacer_set_convergence_distance
Returns
The current convergence distance.

◆ leia_interlacer_set_convergence_distance()

LEIASDK_API void leia_interlacer_set_convergence_distance ( struct leia_interlacer ,
float  distance 
)

Set the convergence distance.

Use this method to set the convergence distance. The convergence distance value determines the distance at which objects appear directly on the display. Objects closer than the convergence distance appear to float in front of the display and objects farther than the convergence distance appear to be inside the display.

See also
GetConvergenceDistance
Parameters
[in]distanceThe convergence distance.

◆ leia_interlacer_get_converged_orthographic_view_info()

LEIASDK_API void leia_interlacer_get_converged_orthographic_view_info ( struct leia_interlacer ,
int32_t  viewIndex,
LEIA_CONST_FLOAT_SLICE(3)  cameraPos,
LEIA_CONST_FLOAT_SLICE(3)  cameraDir,
LEIA_CONST_FLOAT_SLICE(3)  cameraUp,
float  width,
float  height,
float  nearPlane,
float  farPlane,
LEIA_FLOAT_SLICE(3)  viewPos,
LEIA_FLOAT_SLICE(16)  viewProjectionMatrix,
float *  viewShearX,
float *  viewShearY 
)

Retrieve information related to a view.

Use this method to obtain general information about a view when the view will be renderered with an orthographic projection.

Parameters
[in]viewIndexThe view index, starting at zero and increasing from left-to-right from the main camera's perspective.
[in]cameraPosMain camera position.
[in]cameraDirMain camera direction.
[in]cameraUpMain camera up vector.
[in]widthWidth of orthograpic projection.
[in]heightHeight of orthograpic projection.
[in]nearPlaneFrustum near plane distance.
[in]farPlaneFrustum far plane distance.
[out]viewPosPosition of the view [Optional].
[out]viewProjectionMatrixProjection matrix of the view [Optional].
[out]viewShearXHorizontal shear value for the view [Optional].
[out]viewShearYVertical shear value for the view [Optional].

◆ leia_interlacer_get_converged_perspective_view_info()

LEIASDK_API void leia_interlacer_get_converged_perspective_view_info ( struct leia_interlacer ,
int32_t  viewIndex,
LEIA_CONST_FLOAT_SLICE(3)  cameraPos,
LEIA_CONST_FLOAT_SLICE(3)  cameraDir,
LEIA_CONST_FLOAT_SLICE(3)  cameraUp,
float  fieldOfView,
float  aspectRatio,
float  nearPlane,
float  farPlane,
LEIA_FLOAT_SLICE(3)  viewPos,
LEIA_FLOAT_SLICE(16)  viewProjectionMatrix,
float *  viewFieldOfView,
float *  viewShearX,
float *  viewShearY 
)

Retrieve information related to a view.

Use this method to obtain general information about a view when the view will be renderered with a perspective projection.

Parameters
[in]viewIndexThe view index, starting at zero and increasing from left-to-right from the main camera's perspective.
[in]cameraPosMain camera position.
[in]cameraDirMain camera direction.
[in]cameraUpMain camera up vector.
[in]fieldOfViewHorizontal field of view of the projection (in radians).
[in]aspectRatioRatio of the horizontal-to-vertical projection plane size.
[in]nearPlaneFrustum near plane distance.
[in]farPlaneFrustum far plane distance.
[out]viewPosPosition of the view [Optional].
[out]viewProjectionMatrixProjection matrix of the view [Optional].
[out]viewFieldOfViewHorizontal field of view of the view [Optional].
[out]viewShearXHorizontal shear value for the view [Optional].
[out]viewShearYVertical shear value for the view [Optional].

◆ leia_interlacer_set_fit_mode()

LEIASDK_API void leia_interlacer_set_fit_mode ( struct leia_interlacer ,
enum leia_fit_mode  mode 
)

Set the fit mode.

Use this method to set the fit mode. The fit mode allows fitting interlaced content at a different aspect-ratio than the render-target.

See also
leia_interlacer_get_fit_mode
Parameters
[in]modeThe desired fit mode.

◆ leia_interlacer_get_fit_mode()

LEIA_NODISCARD LEIASDK_API enum leia_fit_mode leia_interlacer_get_fit_mode ( struct leia_interlacer )

Get the fit mode.

Use this method to retrieve the fit mode value set via leia_interlacer_set_fit_mode. The fit mode allows fitting interlaced content at a different aspect-ratio than the render-target.

See also
leia_interlacer_set_fit_mode
Returns
The current fit mode.

◆ leia_interlacer_get_rect_matrix()

LEIASDK_API void leia_interlacer_get_rect_matrix ( struct leia_interlacer ,
LEIA_FLOAT_SLICE(16)  transformMatrix 
)

Get the rect matrix.

Use this method to retrieve the matrix set via leia_interlacer_set_fit_mode.

See also
leia_interlacer_set_fit_mode
Parameters
[out]transformMatrixThe rect matrix is returned here

◆ leia_interlacer_set_local_matrix()

LEIASDK_API void leia_interlacer_set_local_matrix ( struct leia_interlacer ,
LEIA_CONST_FLOAT_SLICE(16)  transformMatrix 
)

Set the local matrix.

Use this method to set the local matrix e.g. for zoom & pan gesture handling

Parameters
[in]transformMatrixThe new local matrix

◆ leia_interlacer_set_custom_texture_matrix()

LEIASDK_API void leia_interlacer_set_custom_texture_matrix ( struct leia_interlacer ,
LEIA_CONST_FLOAT_SLICE(16)  textureTransform 
)

Set the custom texture matrix.

Use this method to scale media which SurfaceView thinks has non-standard dimensions

Parameters
[in]textureTransformThe new custom texture matrix

◆ leia_interlacer_set_alpha()

LEIASDK_API void leia_interlacer_set_alpha ( struct leia_interlacer ,
float  alpha 
)

Sets the alpha blending value.

When calling DoPostProcess, you have the option of blending the interlaced result onto the render-target. This method sets the blend amount, where zero is invisible and one is fully opaque.

Parameters
[in]alphaThe alpha-blending value.

◆ leia_interlacer_set_flip_input_uv_vertical()

LEIASDK_API void leia_interlacer_set_flip_input_uv_vertical ( struct leia_interlacer ,
leia_bool  flip 
)

Set whether to flip the views vertically.

If your views are inverted vertically, use this method to flip them during interlacing.

Parameters
[in]flipWhether to flip the views.

◆ leia_interlacer_set_single_view_mode()

LEIASDK_API void leia_interlacer_set_single_view_mode ( struct leia_interlacer ,
leia_bool  setSingleView,
int32_t  singleViewIndex 
)

Set single-view interlacing mode.

Use this method to disable interlacing and render a single view instead.

Parameters
[in]setSingleViewWhether to enable single-view mode.
[in]singleViewIndexIndex of the view to be rendering if single-view mode is enabled.

◆ leia_interlacer_set_single_view_mode_listener()

LEIASDK_API void leia_interlacer_set_single_view_mode_listener ( struct leia_interlacer ,
struct leia_interlacer_single_view_mode_listener const *  listener 
)

Set single-view mode callback.

Single-view mode is automatically enabled when no face is detected for a certain amount of time and disabled when a new face is detected. To receive a callback when this occurs, use this method to specify the callback structure.

Parameters
[in]listenerThe structure that will get a method callback when single-view mode changes.

◆ leia_interlacer_set_source_views_size()

LEIASDK_API void leia_interlacer_set_source_views_size ( struct leia_interlacer ,
int32_t  sourceWidth,
int32_t  sourceHeight,
leia_bool  isHorizontalViews 
)

Set dimensions of the views.

Use this method to specify the size and layout of the views texture. This is necessary when you a fit mode other than FILL.

See also
leia_interlacer_set_fit_mode
Parameters
[in]sourceWidthWidth of the views.
[in]sourceHeightHeight of the views.
[in]isHorizontalViewsIf the views are laid-out horizontally.

◆ leia_interlacer_get_source_views_size()

LEIASDK_API void leia_interlacer_get_source_views_size ( struct leia_interlacer ,
int32_t *  sourceWidth,
int32_t *  sourceHeight,
leia_bool isHorizontalViews 
)

Get dimensions of the views previously set via leia_interlacer_set_source_views_size.

◆ leia_interlacer_set_source_media_is_video()

LEIASDK_API void leia_interlacer_set_source_media_is_video ( struct leia_interlacer ,
leia_bool  isVideo 
)

Set whether source media is a video or not.

Parameters
[in]isVideoSet to true if source media is a video

◆ leia_interlacer_set_source_media_scale()

LEIASDK_API void leia_interlacer_set_source_media_scale ( struct leia_interlacer ,
float  scaleX,
float  scaleY 
)

Set source media scale factors.

Parameters
[in]scaleXHorizontal scale of source media
[in]scaleYVertical scale of source media

◆ leia_interlacer_set_source_views_srgb()

LEIASDK_API void leia_interlacer_set_source_views_srgb ( struct leia_interlacer ,
leia_bool  isSRGB 
)

Set whether view textures are in a sRGB format.

Parameters
[in]isSRGBSet to true if view textures are in a sRGB format.

◆ leia_interlacer_set_in_shader_srgb_conversion()

LEIASDK_API void leia_interlacer_set_in_shader_srgb_conversion ( struct leia_interlacer ,
leia_bool  sRGBRead,
leia_bool  sRGBWrite 
)

Set whether to sRGB conversions are enabled or disabled in the interlacing shader.

Parameters
[in]sRGBReadSet to true to enable sRGB conversion when reading view texture.
[in]sRGBWriteSet to true to enable sRGB conversion when writing to render-target.

◆ leia_interlacer_set_viewport_screen_position()

LEIASDK_API void leia_interlacer_set_viewport_screen_position ( struct leia_interlacer ,
int32_t  posX,
int32_t  posY 
)

Set the viewport screen position.

Use this method to set the viewport origin on the screen where the interlacing result will be rendered.

Parameters
[in]newXPosOrigin pixel x-coordinate
[in]newYPosOrigin pixel y-coordinate

◆ leia_interlacer_set_viewport()

LEIASDK_API void leia_interlacer_set_viewport ( struct leia_interlacer ,
int32_t  posX,
int32_t  posY,
int32_t  width,
int32_t  height 
)

Set the viewport.

Use this method to set the viewport in the render-target where the interlacing result will be rendered.

Parameters
[in]posXOrigin pixel x-coordinate
[in]posYOrigin pixel y-coordinate
[in]widthViewport's width
[in]heightViewport's height

◆ leia_interlacer_enable_reconvergence()

LEIASDK_API void leia_interlacer_enable_reconvergence ( struct leia_interlacer ,
leia_bool  enable 
)

Enable or disable reconvergence.

Use this method to enable or disable reconvergence. When enabled, the input views are shifted depending on the value set via leia_interlacer_set_reconvergence().

See also
leia_interlacer_is_reconvergence_enabled, leia_interlacer_get_reconvergence, leia_interlacer_set_reconvergence, leia_interlacer_set_reconvergence_zoom
Parameters
enableWhether to enable or disable reconvergence.

◆ leia_interlacer_is_reconvergence_enabled()

LEIA_NODISCARD LEIASDK_API leia_bool leia_interlacer_is_reconvergence_enabled ( struct leia_interlacer )

Gets whether we are using reconvergence.

See also
leia_interlacer_get_reconvergence, leia_interlacer_enable_reconvergence, leia_interlacer_set_reconvergence, leia_interlacer_set_reconvergence_zoom
Returns
Whether reconvergence is enabled.

◆ leia_interlacer_get_reconvergence()

LEIA_NODISCARD LEIASDK_API float leia_interlacer_get_reconvergence ( struct leia_interlacer ,
int  layer 
)

Get the reconvergence amount.

Use this method to retrieve the reconvergence amount set via leia_interlacer_set_reconvergence().

See also
leia_interlacer_is_reconvergence_enabled, leia_interlacer_enable_reconvergence, leia_interlacer_set_reconvergence, leia_interlacer_set_reconvergence_zoom
Parameters
[in]layerLayer for the reconverergence (default is 0)
Returns
The current reconvergence amount.

◆ leia_interlacer_set_reconvergence()

LEIASDK_API void leia_interlacer_set_reconvergence ( struct leia_interlacer ,
float  value,
int  layer 
)

Set the reconvergence amount.

Using reconvergence allows shifting the views to account for disparity.

See also
leia_interlacer_get_reconvergence, leia_interlacer_is_reconvergence_enabled, leia_interlacer_enable_reconvergence, leia_interlacer_set_reconvergence_zoom
Parameters
[in]valueAmount of reconvergence.
[in]layerLayer for the reconverergence (default is 0)

◆ leia_interlacer_set_reconvergence_zoom()

LEIASDK_API void leia_interlacer_set_reconvergence_zoom ( struct leia_interlacer ,
leia_bool  zoomX,
leia_bool  zoomXY,
int  layer 
)

Set what directions reconvergence is calculated for.

Use this method to specify whether you wish to apply reconvergence horizontally or horizontally and vertically.

See also
leia_interlacer_get_reconvergence, leia_interlacer_is_reconvergence_enabled, leia_interlacer_enable_reconvergence, leia_interlacer_set_reconvergence
Parameters
[in]zoomXWhether to apply reconvergence in the horizontal direction.
[in]zoomXYWhether to apply reconvergence in the horizontal and vertical direction.
[in]layerLayer for the reconverergence (default is 0)

◆ leia_interlacer_set_use_atlas_for_views()

LEIASDK_API void leia_interlacer_set_use_atlas_for_views ( struct leia_interlacer ,
leia_bool   
)

Set whether the views are a single atlas vs individual textures.

You can specify whether your views are all packed into a atlas or are in indidual textures with this method.

See also
leia_interlacer_get_use_atlas_for_views

◆ leia_interlacer_get_use_atlas_for_views()

LEIA_NODISCARD LEIASDK_API leia_bool leia_interlacer_get_use_atlas_for_views ( struct leia_interlacer )

Gets whether we are using a single atlas or individual views.

Use this method to determine if views are individual textures or are all combined into a single atlas.

See also
leia_interlacer_set_use_atlas_for_views
Returns
Whether an atlas is used for views.

◆ leia_interlacer_get_view_offset()

LEIASDK_API void leia_interlacer_get_view_offset ( struct leia_interlacer ,
int32_t  view,
LEIA_FLOAT_SLICE(3)  offset 
)

Gets a view offset.

Use this method to get the view position for the specified view index. The returned value is the relative offset where the view is located.

See also
leia_interlacer_get_use_atlas_for_views
Parameters
[in]viewView index.
[out]offsetOffset of view camera.

◆ leia_interlacer_set_invert_screen_texture_coordinates()

LEIASDK_API void leia_interlacer_set_invert_screen_texture_coordinates ( struct leia_interlacer ,
leia_bool  invert 
)

Set whether to invert screen texture coordinates vertically.

If the interlaced image is going to be inverted on presentation, use this method to flip the interlacing grid pattern.

Parameters
[in]invertWhether to invert the interlacing grid pattern.

◆ leia_interlacer_get_graphics_api()

LEIA_NODISCARD LEIASDK_API enum leia_graphics_api leia_interlacer_get_graphics_api ( struct leia_interlacer )

Get the graphics API.

Use this method to retrieve the graphics API which is determined by which Initialize{OpenGL|D3D11|D3D12|Vulan} method was used.

Returns
The current graphics API.

◆ leia_get_view_comfort_zone()

LEIASDK_API void leia_get_view_comfort_zone ( enum leia_view_info_mode  mode,
float  baselineScaling,
float  convergencePlaneDistance,
float  nearPlane,
float  farPlane,
float *  viewComfortZoneNear,
float *  viewComfortZoneFar 
)

A helper function to compute comfort zone range.

Parameters
[in]modeView mode
[in]baselineScalingBaseline scaling value from Leia SDK
[in]convergencePlaneDistanceConvergence plane distance.
[in]nearPlaneFrustum near plane.
[in]farPlaneFrustum far plane.
[out]viewComfortZoneNearNear comfort zone. For best 3d results, keep geometry beyond this distance.
[out]viewComfortZoneFarFar comfort zone. For best 3d results, keep geometry before this distance.

◆ leia_get_view_info()

LEIASDK_API void leia_get_view_info ( enum leia_view_info_mode  mode,
LEIA_CONST_FLOAT_SLICE(3)  viewOffset,
LEIA_CONST_FLOAT_SLICE(3)  cameraPos,
LEIA_CONST_FLOAT_SLICE(3)  cameraDir,
LEIA_CONST_FLOAT_SLICE(3)  cameraUp,
float  perspectiveFieldOfView,
float  perspectiveAspectRatio,
float  orthoWidth,
float  orthoHeight,
float  nearPlane,
float  farPlane,
float  convergencePlaneDistance,
float  convergencePlaneHeight,
LEIA_FLOAT_SLICE(3)  viewPos,
LEIA_FLOAT_SLICE(16)  viewProjectionMatrix,
float *  viewFieldOfView,
float *  viewShearX,
float *  viewShearY 
)

A helper function to compute per-view values.

Parameters
[in]modeView mode
[in]viewOffsetView offset from Leia Interlacer
[in]cameraPosCamera position.
[in]cameraDirCamera forward direction (unit vector).
[in]cameraUpCamera up direction (unit vector).
[in]perspectiveFieldOfViewThe field of view for perspective projections.
[in]perspectiveAspectRatioAspect ratio for perspective projections.
[in]orthoWidthWidth of orthographic projection.
[in]orthoHeightHeight of orthographic projection.
[in]nearPlaneFrustum near plane.
[in]farPlaneFrustum far plane.
[in]convergencePlaneDistanceConvergence plane distance.
[in]convergencePlaneHeightConvergence plane height.
[out]viewPosPosition of camera for specified view.
[out]viewProjectionMatrixProjection matrix for specified view.
[out]viewFieldOfViewField-of-view for specified view.
[out]viewShearXX shear factor.
[out]viewShearYX shear factor.