c/main: Add comp_renderer docs.

This commit is contained in:
Ryan Pavlik 2021-04-13 16:34:51 -05:00 committed by Jakob Bornecrantz
parent ab5f9ae9d8
commit 80da6fe3b8

View file

@ -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);