RAMSES Documentation  27.0.130
Information for RAMSES users and developers
Public Member Functions | Public Attributes | List of all members
ramses::RendererConfig Class Reference

The RendererConfig holds a set of parameters to be used to initialize a renderer. More...

#include <RendererConfig.h>

Inheritance diagram for ramses::RendererConfig:
[legend]
Collaboration diagram for ramses::RendererConfig:
[legend]

Public Member Functions

 RendererConfig ()
 Default constructor of RendererConfig. More...
 
 RendererConfig (int32_t argc, char const *const *argv)
 Constructor of RendererConfig that takes command line parameters and parses them to initialize the parameters. More...
 
 RendererConfig (const RendererConfig &other)
 Copy constructor of RendererConfig. More...
 
virtual ~RendererConfig ()
 Destructor of RendererConfig. More...
 
status_t setBinaryShaderCache (IBinaryShaderCache &cache)
 Set the Binary Shader Cache to be used in Renderer. More...
 
status_t setRendererResourceCache (IRendererResourceCache &cache)
 Set the resource cache implementation to be used by the renderer. More...
 
status_t enableSystemCompositorControl ()
 Enable the renderer to communicate with the system compositor. This flag needs to be enabled before calling any of the system compositor related calls, otherwise an error will be reported when issuing such commands. More...
 
status_t setFrameCallbackMaxPollTime (uint64_t waitTimeInUsec)
 Set the maximum time to wait for the system compositor frame callback before aborting and skipping rendering of current frame. This is an advanced function to be used by experts only. Be warned that the synchronization of frame callbacks with the system compositor and the display controller vsync is a sensitive topic and can majorly influence system performance. More...
 
status_t setWaylandEmbeddedCompositingSocketName (const char *socketname)
 Set the name to be used for the embedded compositing display socket name. More...
 
const char * getWaylandEmbeddedCompositingSocketName () const
 Get the current setting of embedded compositing display socket name. More...
 
status_t setWaylandEmbeddedCompositingSocketGroup (const char *groupname)
 Request that the embedded compositing display socket belongs to the given group. More...
 
status_t setWaylandEmbeddedCompositingSocketPermissions (uint32_t permissions)
 Request that the embedded compositing display socket obtains the permissions given. More...
 
status_t setWaylandEmbeddedCompositingSocketFD (int socketFileDescriptor)
 Set the file descriptor for the embedded compositor display socket. More...
 
status_t setSystemCompositorWaylandDisplay (const char *waylandDisplay)
 Set the Wayland display name to connect system compositor to. This will override the default behavior which is to use WAYLAND_DISPLAY environment variable. More...
 
const char * getSystemCompositorWaylandDisplay () const
 Get the current setting of Wayland display name. More...
 
status_t setRenderThreadLoopTimingReportingPeriod (std::chrono::milliseconds period)
 Set the desired reporting period for first display loop timings. More...
 
std::chrono::milliseconds getRenderThreadLoopTimingReportingPeriod () const
 Get the current reporting period for renderThread loop timings. More...
 
RendererConfigoperator= (const RendererConfig &other)=delete
 Deleted copy assignment. More...
 
- Public Member Functions inherited from ramses::StatusObject
status_t validate () const
 Generates verbose validation of the object. More...
 
const char * getValidationReport (EValidationSeverity minSeverity=EValidationSeverity_Info) const
 Provides verbose report in human readable form generated by validate. More...
 
const char * getStatusMessage (status_t status) const
 Get the string description for a status provided by a RAMSES API function. More...
 
 StatusObject (const StatusObject &other)=delete
 Deleted copy constructor. More...
 
StatusObjectoperator= (const StatusObject &other)=delete
 Deleted copy assignment. More...
 

Public Attributes

class RendererConfigImpl & impl
 
- Public Attributes inherited from ramses::StatusObject
class StatusObjectImpl & impl
 

Additional Inherited Members

- Protected Member Functions inherited from ramses::StatusObject
 StatusObject (StatusObjectImpl &pimpl)
 Constructor for StatusObject. More...
 
virtual ~StatusObject ()
 Destructor of the StatusObject. More...
 

Detailed Description

The RendererConfig holds a set of parameters to be used to initialize a renderer.

Examples
ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/src/main.cpp, ramses-example-local-datalink/src/main.cpp, ramses-example-local-displays/src/main.cpp, ramses-example-local-dma-offscreenbuffer/src/main.cpp, ramses-example-local-geometry-shaders/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, ramses-example-local-pick-handling/src/main.cpp, ramses-example-local-scene-referencing/src/main.cpp, and ramses-example-local-viewport-link/src/main.cpp.

Constructor & Destructor Documentation

◆ RendererConfig() [1/3]

ramses::RendererConfig::RendererConfig ( )

Default constructor of RendererConfig.

◆ RendererConfig() [2/3]

ramses::RendererConfig::RendererConfig ( int32_t  argc,
char const *const *  argv 
)

Constructor of RendererConfig that takes command line parameters and parses them to initialize the parameters.

Parameters
[in]argcNumber of arguments in arguments array parameter
[in]argvArray of arguments as strings

◆ RendererConfig() [3/3]

ramses::RendererConfig::RendererConfig ( const RendererConfig other)

Copy constructor of RendererConfig.

Parameters
[in]otherOther instance of RendererConfig

◆ ~RendererConfig()

virtual ramses::RendererConfig::~RendererConfig ( )
virtual

Destructor of RendererConfig.

Member Function Documentation

◆ enableSystemCompositorControl()

status_t ramses::RendererConfig::enableSystemCompositorControl ( )

Enable the renderer to communicate with the system compositor. This flag needs to be enabled before calling any of the system compositor related calls, otherwise an error will be reported when issuing such commands.

Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ getRenderThreadLoopTimingReportingPeriod()

std::chrono::milliseconds ramses::RendererConfig::getRenderThreadLoopTimingReportingPeriod ( ) const

Get the current reporting period for renderThread loop timings.

Returns
Reporting period for renderThread loop timings

◆ getSystemCompositorWaylandDisplay()

const char* ramses::RendererConfig::getSystemCompositorWaylandDisplay ( ) const

Get the current setting of Wayland display name.

Returns
Wayland display name to use for connection, empty means default

◆ getWaylandEmbeddedCompositingSocketName()

const char* ramses::RendererConfig::getWaylandEmbeddedCompositingSocketName ( ) const

Get the current setting of embedded compositing display socket name.

Deprecated:
This function is deprecated and will be removed in one of the next major releases. Use ramses::DisplayConfig::getWaylandEmbeddedCompositingSocketName instead if possible.
Returns
Wayland display name to use for embedded compositing socket

◆ operator=()

RendererConfig& ramses::RendererConfig::operator= ( const RendererConfig other)
delete

Deleted copy assignment.

Parameters
otherunused
Returns
unused

◆ setBinaryShaderCache()

status_t ramses::RendererConfig::setBinaryShaderCache ( IBinaryShaderCache cache)

Set the Binary Shader Cache to be used in Renderer.

Parameters
[in]cachethe binary shader cache to be used by the Renderer
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setFrameCallbackMaxPollTime()

status_t ramses::RendererConfig::setFrameCallbackMaxPollTime ( uint64_t  waitTimeInUsec)

Set the maximum time to wait for the system compositor frame callback before aborting and skipping rendering of current frame. This is an advanced function to be used by experts only. Be warned that the synchronization of frame callbacks with the system compositor and the display controller vsync is a sensitive topic and can majorly influence system performance.

Parameters
[in]waitTimeInUsecThe maximum time wait for a frame callback, in microseconds
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setRendererResourceCache()

status_t ramses::RendererConfig::setRendererResourceCache ( IRendererResourceCache cache)

Set the resource cache implementation to be used by the renderer.

Parameters
[in]cachethe resource cache to be used by the renderer.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setRenderThreadLoopTimingReportingPeriod()

status_t ramses::RendererConfig::setRenderThreadLoopTimingReportingPeriod ( std::chrono::milliseconds  period)

Set the desired reporting period for first display loop timings.

The values are reported periodically via the renderer callback ramses::IRendererEventHandler::renderThreadLoopTimings. Only the first display is measured. A value of zero disables reporting and is the default.

Parameters
[in]periodCyclic time period after which timing information should be reported
Returns
StatusOK on success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setSystemCompositorWaylandDisplay()

status_t ramses::RendererConfig::setSystemCompositorWaylandDisplay ( const char *  waylandDisplay)

Set the Wayland display name to connect system compositor to. This will override the default behavior which is to use WAYLAND_DISPLAY environment variable.

Parameters
[in]waylandDisplayWayland display name to use for connection
Returns
StatusOK on success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setWaylandEmbeddedCompositingSocketFD()

status_t ramses::RendererConfig::setWaylandEmbeddedCompositingSocketFD ( int  socketFileDescriptor)

Set the file descriptor for the embedded compositor display socket.

Deprecated:
This function is deprecated and will be removed in one of the next major releases. Use ramses::DisplayConfig::setWaylandEmbeddedCompositingSocketFD instead if possible. Note: setting EC config on both ramses::RendererConfig and ramses::DisplayConfig will lead to display creation failure.

The embedded compositor communicates with its clients via a socket file. There are two distinct ways to connect the embedded compositor with its socketfile.

Either you provide a name for the socket file or the file descriptor of the socket file.

This method is used to set the file descriptor.

When the file descriptor is set, the embedded compositor will use this file descriptor directly as its socket. It is expected that this file descriptor is belonging to a file already open, bind and listen to.

If both filename and file descriptor are set display creation will fail.

Parameters
socketFileDescriptorThe file descriptor of the socket for the embedded compositor.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setWaylandEmbeddedCompositingSocketGroup()

status_t ramses::RendererConfig::setWaylandEmbeddedCompositingSocketGroup ( const char *  groupname)

Request that the embedded compositing display socket belongs to the given group.

Deprecated:
This function is deprecated and will be removed in one of the next major releases. Use ramses::DisplayConfig::setWaylandEmbeddedCompositingSocketGroup instead if possible. Note: setting EC config on both ramses::RendererConfig and ramses::DisplayConfig will lead to display creation failure.
Parameters
[in]groupnameThe group name of the socket.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setWaylandEmbeddedCompositingSocketName()

status_t ramses::RendererConfig::setWaylandEmbeddedCompositingSocketName ( const char *  socketname)

Set the name to be used for the embedded compositing display socket name.

Deprecated:
This function is deprecated and will be removed in one of the next major releases. Use ramses::DisplayConfig::setWaylandEmbeddedCompositingSocketName instead if possible. Note: setting EC config on both ramses::RendererConfig and ramses::DisplayConfig will lead to display creation failure.

The embedded compositor communicates with its clients via a socket file. There are two distinct ways to connect the embedded compositor with its socketfile. Either you provide a name for the socket file or the file descriptor of the socket file.

This method is used to set the file name of the socket.

Providing the name of the socket file leads to the embedded compositor searching/creating the socket file in the directory pointed to by $XDG_RUNTIME_DIR. If a groupname is set, also the group is set.

Be aware that the socket file name is only used if the file descriptor is set to an invalid value (default), see RendererConfig::setWaylandEmbeddedCompositingSocketFD

If both filename and file descriptor are set display creation will fail.

Parameters
[in]socketnameThe file name of the socket file.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setWaylandEmbeddedCompositingSocketPermissions()

status_t ramses::RendererConfig::setWaylandEmbeddedCompositingSocketPermissions ( uint32_t  permissions)

Request that the embedded compositing display socket obtains the permissions given.

Deprecated:
This function is deprecated and will be removed in one of the next major releases. Use ramses::DisplayConfig::setWaylandEmbeddedCompositingSocketPermissions instead if possible. Note: setting EC config on both ramses::RendererConfig and ramses::DisplayConfig will lead to display creation failure.

The format should be the same as expected by chmod() mode argument. Permissions value may not be 0. If not set "user+group can read/write (0660)" is used as default.

The socket should be readable and writable for the required users, some examples values are:

  • Only user r/w: 384u (or in octal 0600)
  • User+Group r/w: 432u (or in octal 0660)
  • Everyone r/w: 438u (or in octal 0666)

This value is only used when socket is given as name, e.g. via setWaylandEmbeddedCompositingSocketName(), not when passed in as filedescriptor.

Parameters
[in]permissionsThe permissions of the socket.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

Member Data Documentation

◆ impl

class RendererConfigImpl& ramses::RendererConfig::impl

Stores internal data for implementation specifics of RendererConfig.


The documentation for this class was generated from the following file: