Commit 80da6fe3 authored by Ryan Pavlik's avatar Ryan Pavlik Committed by Jakob Bornecrantz
Browse files

c/main: Add comp_renderer docs.

parent ab5f9ae9
// 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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment