Fove SDK  v0.18.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 an empty 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 *ignore=nullptr)
 Wraps fove_Compositor_getAdapterId() More...
 
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_CompositorgetCObject () const
 Returns the underlying C type which the caller can use to invoke the C API directly, or null if not valid.
 
bool isValid () const
 Returns true if this object is non-empty. 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 an empty 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 empty or non-empty. By return, it will be empty.

◆ ~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.

Here is the call graph for this function:

Member Function Documentation

◆ destroy()

Result Fove::Compositor::destroy ( )

Destroys the compositor object, releasing resources.

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

Here is the call graph for this function:

◆ getAdapterId()

Result<AdapterId> Fove::Compositor::getAdapterId ( AdapterId ignore = nullptr)

Wraps fove_Compositor_getAdapterId()

Parameters
ignoreThis is not used and will be removed in a future version
Here is the call graph for this function:

◆ 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 empty or non-empty. By return, it will be empty.
Here is the call graph for this function: