From 80da6fe3b80cf5048d0e60e2a179d74f94d762a0 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 13 Apr 2021 16:34:51 -0500 Subject: [PATCH] c/main: Add comp_renderer docs. --- src/xrt/compositor/main/comp_renderer.h | 45 +++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/src/xrt/compositor/main/comp_renderer.h b/src/xrt/compositor/main/comp_renderer.h index ff78c3d91..9fbd450fd 100644 --- a/src/xrt/compositor/main/comp_renderer.h +++ b/src/xrt/compositor/main/comp_renderer.h @@ -1,4 +1,4 @@ -// Copyright 2019, Collabora, Ltd. +// Copyright 2019-2021, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 /*! * @file @@ -19,12 +19,17 @@ extern "C" { struct comp_compositor; -struct comp_renderer; struct comp_swapchain_image; +/*! + * @brief Renderer used by compositor. + */ +struct comp_renderer; /*! * Called by the main compositor code to create the renderer. * + * @public @memberof comp_renderer + * @see comp_compositor * @ingroup comp_main */ struct comp_renderer * @@ -33,6 +38,7 @@ comp_renderer_create(struct comp_compositor *c); /*! * Reset renderer as input has changed. * + * @public @memberof comp_renderer * @ingroup comp_main */ void @@ -41,6 +47,7 @@ comp_renderer_reset(struct comp_renderer *r); /*! * Clean up and free the renderer. * + * @public @memberof comp_renderer * @ingroup comp_main */ void @@ -49,11 +56,16 @@ comp_renderer_destroy(struct comp_renderer *r); /*! * Render frame. * + * @public @memberof comp_renderer * @ingroup comp_main */ void comp_renderer_draw(struct comp_renderer *r); +/*! + * @public @memberof comp_renderer + * @ingroup comp_main + */ void comp_renderer_set_projection_layer(struct comp_renderer *r, uint32_t layer, @@ -61,12 +73,20 @@ comp_renderer_set_projection_layer(struct comp_renderer *r, struct comp_swapchain_image *right_image, struct xrt_layer_data *data); +/*! + * @public @memberof comp_renderer + * @ingroup comp_main + */ void comp_renderer_set_quad_layer(struct comp_renderer *r, uint32_t layer, struct comp_swapchain_image *image, struct xrt_layer_data *data); +/*! + * @public @memberof comp_renderer + * @ingroup comp_main + */ void comp_renderer_set_cylinder_layer(struct comp_renderer *r, uint32_t layer, @@ -74,13 +94,22 @@ comp_renderer_set_cylinder_layer(struct comp_renderer *r, struct xrt_layer_data *data); #ifdef XRT_FEATURE_OPENXR_LAYER_EQUIRECT1 +/*! + * @public @memberof comp_renderer + * @ingroup comp_main + */ void comp_renderer_set_equirect1_layer(struct comp_renderer *r, uint32_t layer, struct comp_swapchain_image *image, struct xrt_layer_data *data); #endif + #ifdef XRT_FEATURE_OPENXR_LAYER_EQUIRECT2 +/*! + * @public @memberof comp_renderer + * @ingroup comp_main + */ void comp_renderer_set_equirect2_layer(struct comp_renderer *r, uint32_t layer, @@ -88,9 +117,21 @@ comp_renderer_set_equirect2_layer(struct comp_renderer *r, struct xrt_layer_data *data); #endif +/*! + * Allocate an internal array of per-layer data with the given number of elements. + * + * @public @memberof comp_renderer + * @ingroup comp_main + */ void comp_renderer_allocate_layers(struct comp_renderer *self, uint32_t num_layers); +/*! + * De-initialize and free internal array of per-layer data. + * + * @public @memberof comp_renderer + * @ingroup comp_main + */ void comp_renderer_destroy_layers(struct comp_renderer *self);