Fove SDK  v0.16.0
Public Member Functions | List of all members
Fove::Compositor Class Reference

Compositor API. More...

#include <FoveAPI.h>

Inheritance diagram for Fove::Compositor:
Inheritance graph
[legend]
Collaboration diagram for Fove::Compositor:
Collaboration graph
[legend]

Public Member Functions

 Compositor ()=default
 Creates a null compositor. More...
 
 Compositor (Fove_Compositor &compositor)
 Creates a compositor from an existing C API object. More...
 
 Compositor (Compositor &&other)
 Move constructs a compositor. More...
 
 ~Compositor ()
 Destroys the compositor, freeing any resources used (including all layers) More...
 
Result< CompositorLayercreateLayer (const CompositorLayerCreateInfo &layerInfo)
 Wraps fove_Compositor_createLayer()
 
Result destroy ()
 Destroys the compositor object, releasing resources. More...
 
Result< AdapterIdgetAdapterId (AdapterId *outAdapterId)
 Wraps fove_Compositor_getAdapterId()
 
Result< PosegetLastRenderPose ()
 Wraps fove_Compositor_getLastRenderPose()
 
Result< bool > isReady ()
 Wraps fove_Compositor_isReady()
 
Compositoroperator= (Compositor &&other)
 Destroys the existing compositor if any, then moves the one referenced by other, if any, into this object. More...
 
Result submit (const CompositorLayerSubmitInfo *submitInfo, const size_t layerCount)
 Wraps fove_Compositor_submit()
 
Result submit (const CompositorLayerSubmitInfo &submitInfo)
 Alternate version of submit() that simply takes one layer.
 
Result< PosewaitForRenderPose ()
 Wraps fove_Compositor_waitForRenderPose()
 
- Public Member Functions inherited from Fove::Object< Fove_Compositor >
Fove_Compositor * getCObject () const
 Returns the underlying C type which the caller can use to invoke the C API directly. More...
 

Detailed Description

Compositor API.

This class is a wrapper around the C API's Fove_Compositor.

It is the main way to draw content to a headset.

Constructor & Destructor Documentation

◆ Compositor() [1/3]

Fove::Compositor::Compositor ( )
default

Creates a null compositor.

Please use Headset::createCompositor() to get a valid compositor

See also
Headset::createCompositor()

◆ Compositor() [2/3]

Fove::Compositor::Compositor ( Fove_Compositor &  compositor)

Creates a compositor from an existing C API object.

This is not normally invoked directly, rather Headset::createCompositor(), which wraps this, is typically used.

See also
Headset::createCompositor()

◆ Compositor() [3/3]

Fove::Compositor::Compositor ( Compositor &&  other)

Move constructs a compositor.

Parameters
othermay be null or non-null. By return, it will be null.

◆ ~Compositor()

Fove::Compositor::~Compositor ( )

Destroys the compositor, freeing any resources used (including all layers)

Since an error cannot be returned, any error from fove_Compositor_destroy will be logged.

Member Function Documentation

◆ destroy()

Result Fove::Compositor::destroy ( )

Destroys the compositor object, releasing resources.

Afer this call, this object will be in a null state and future calls will fail. This is handled by the destructor, usually the user doesn't need to call this.

◆ operator=()

Compositor& Fove::Compositor::operator= ( Compositor &&  other)

Destroys the existing compositor if any, then moves the one referenced by other, if any, into this object.

Parameters
othermay be null or non-null. By return, it will be null.