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

The DisplayConfig holds a set of parameters to be used to initialize a display. More...

#include <DisplayConfig.h>

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

Public Member Functions

 DisplayConfig ()
 Default constructor of DisplayConfig. More...
 
 DisplayConfig (int32_t argc, char const *const *argv)
 Constructor of DisplayConfig that takes command line parameters and parses them to initialize the parameters. More...
 
 DisplayConfig (const DisplayConfig &other)
 Copy constructor of DisplayConfig. More...
 
virtual ~DisplayConfig ()
 Destructor of DisplayConfig. More...
 
status_t setWindowRectangle (int32_t x, int32_t y, uint32_t width, uint32_t height)
 Sets the window size and position in display pixel space. This is ignored if window is set fullscreen. More...
 
status_t getWindowRectangle (int32_t &x, int32_t &y, uint32_t &width, uint32_t &height) const
 Get the window size and position in display pixel space, as it was specified by setWindowRectangle() or command line options These values have no relevance if window is set fullscreen. More...
 
status_t setWindowFullscreen (bool fullscreen)
 Automatically sets the window size so that it fills the entire display. Overrides DisplayConfig::setWindowRectangle() when set to true. More...
 
bool isWindowFullscreen () const
 Gets the currently set fullscreen state, which was set either via DisplayConfig::setWindowFullscreen or parsed from command line arguments. More...
 
status_t setWindowBorderless (bool borderless)
 Sets window hints/properties to tell the window manager to disable window borders. More...
 
status_t setMultiSampling (uint32_t numSamples)
 Set number of samples to be used for multisampled rendering. More...
 
status_t getMultiSamplingSamples (uint32_t &numSamples) const
 Get number of samples currently set. More...
 
status_t enableWarpingPostEffect ()
 Enable warping post effect. User has to set warping mesh data later in the display, otherwise the mesh is a fullscreen quad. More...
 
status_t setWaylandIviLayerID (waylandIviLayerId_t waylandIviLayerID)
 [Mandatory on Wayland] Set IVI layer ID to use for attaching the IVI surface created by the display. More...
 
waylandIviLayerId_t getWaylandIviLayerID () const
 Get the ID of the Wayland IVI layer to which the IVI surface used by the display is attached. More...
 
status_t setWaylandIviSurfaceID (waylandIviSurfaceId_t waylandIviSurfaceID)
 [Mandatory on Wayland] Set IVI surface ID to use when creating the display window on Wayland. More...
 
waylandIviSurfaceId_t getWaylandIviSurfaceID () const
 Get the current setting of IVI surface ID. More...
 
status_t setIntegrityRGLDeviceUnit (uint32_t rglDeviceUnit)
 [Mandatory on Integrity] Set device unit number to use when creating the display window on Integrity using RGL Window Manager API. More...
 
uint32_t getIntegrityRGLDeviceUnit () const
 Get the current setting of RGL device unit number. More...
 
void * getAndroidNativeWindow () const
 Get the current setting of Android native window. More...
 
status_t setAndroidNativeWindow (void *nativeWindowPtr)
 [Mandatory on Android] Set native window to use for rendering on Android. More...
 
status_t setWindowIviVisible ()
 Set IVI window to be visible right after window creation. More...
 
status_t keepEffectsUploaded (bool enable)
 By default uploaded effects are kept forever in VRAM to avoid recompiling and reuploading. As their size is mostly negligible this should not have any disadvantages. If however it is desired to delete unused effects same as any other resources use this method to disable that optimization. Note that GPU cache can still prevent effect deletion (see ramses::DisplayConfig::setGPUMemoryCacheSize). More...
 
status_t setGPUMemoryCacheSize (uint64_t size)
 Set the amount of GPU memory in bytes that will be used as cache for resources. Uploaded resources are kept in GPU memory even if not in use by any scene anymore. They are only freed from memory in order to make space for new resources to be uploaded which would not fit in the cache otherwise. First in first out method is used when deciding which unused resource to remove from cache. More...
 
status_t setResizable (bool resizable)
 Enables/disables resizing of the window (Default=Disabled) More...
 
status_t setClearColor (float red, float green, float blue, float alpha)
 Sets the clear color of the displays framebuffer (Default=0.0, 0.0, 0.0, 1.0) More...
 
status_t setX11WindowHandle (unsigned long x11WindowHandle)
 [Only for X11] Set the X11 window handle to create a ramses display from an existing X11 window. More...
 
unsigned long getX11WindowHandle () const
 [Only for X11] Get the current setting of the X11 window handle More...
 
status_t setWindowsWindowHandle (void *hwnd)
 [Only for Windows] Set the HWND handle to create a ramses display from an existing HWND window on a Window platform. More...
 
void * getWindowsWindowHandle () const
 Get the current setting of the Windows window handle (HWND) More...
 
status_t setWaylandDisplay (const char *waylandDisplay)
 Set the Wayland display name to connect to. This will override the default behavior which is to use WAYLAND_DISPLAY environment variable. More...
 
const char * getWaylandDisplay () const
 Get the current setting of Wayland display name. 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 setWaylandEmbeddedCompositingSocketFD (int socketFileDescriptor)
 Set the file descriptor for the embedded compositor display socket. More...
 
status_t setWaylandEmbeddedCompositingSocketPermissions (uint32_t permissions)
 Request that the embedded compositing display socket obtains the permissions given. 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...
 
status_t setPlatformRenderNode (const char *renderNode)
 Set the render node to use for creating GBM buffer objects used for creating DMA Offscreen buffers on platforms that support creation of DMA buffers. More...
 
status_t setSwapInterval (int32_t interval)
 Specifies the minimum number of video frames that are displayed before a buffer swap will occur. More...
 
status_t setScenePriority (sceneId_t sceneId, int32_t priority)
 Specifies the scene's priority on this display. More...
 
status_t setResourceUploadBatchSize (uint32_t batchSize)
 Sets the batch size for resource uploads. More...
 
DisplayConfigoperator= (const DisplayConfig &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...
 

Static Public Member Functions

static status_t setDepthStencilBufferType (DisplayConfig &config, EDepthBufferType depthBufferType)
 Sets whether depth/stencil buffer should be created for the framebuffer of the display. The framebuffer always has a color buffer. By default depth-stencil buffer is created as well. More...
 
static status_t setAsyncEffectUploadEnabled (DisplayConfig &config, bool enabled)
 Sets whether async shader/effect compilation and upload should be enabled. By default async effect compile and upload is enabled. More...
 

Public Attributes

class DisplayConfigImpl & 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 DisplayConfig holds a set of parameters to be used to initialize a display.

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

◆ DisplayConfig() [1/3]

ramses::DisplayConfig::DisplayConfig ( )

Default constructor of DisplayConfig.

◆ DisplayConfig() [2/3]

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

Constructor of DisplayConfig 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

◆ DisplayConfig() [3/3]

ramses::DisplayConfig::DisplayConfig ( const DisplayConfig other)

Copy constructor of DisplayConfig.

Parameters
[in]otherOther instance of DisplayConfig

◆ ~DisplayConfig()

virtual ramses::DisplayConfig::~DisplayConfig ( )
virtual

Destructor of DisplayConfig.

Member Function Documentation

◆ enableWarpingPostEffect()

status_t ramses::DisplayConfig::enableWarpingPostEffect ( )

Enable warping post effect. User has to set warping mesh data later in the display, otherwise the mesh is a fullscreen quad.

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

◆ getAndroidNativeWindow()

void* ramses::DisplayConfig::getAndroidNativeWindow ( ) const

Get the current setting of Android native window.

Returns
the current setting of Android native window, returns nullptr if no value has been set yet

◆ getIntegrityRGLDeviceUnit()

uint32_t ramses::DisplayConfig::getIntegrityRGLDeviceUnit ( ) const

Get the current setting of RGL device unit number.

Returns
the current setting of RGL device unit, returns 0xFFFFFFFF if no value has been set yet

◆ getMultiSamplingSamples()

status_t ramses::DisplayConfig::getMultiSamplingSamples ( uint32_t &  numSamples) const

Get number of samples currently set.

Parameters
[out]numSamplesNumber of samples per pixel.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ getWaylandDisplay()

const char* ramses::DisplayConfig::getWaylandDisplay ( ) const

Get the current setting of Wayland display name.

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

◆ getWaylandEmbeddedCompositingSocketName()

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

Get the current setting of embedded compositing display socket name.

Returns
Wayland display name to use for embedded compositing socket

◆ getWaylandIviLayerID()

waylandIviLayerId_t ramses::DisplayConfig::getWaylandIviLayerID ( ) const

Get the ID of the Wayland IVI layer to which the IVI surface used by the display is attached.

Returns
the current setting of wayland IVI layer ID, returns waylandIviLayerId_t::Invalid() if no value has been set yet

◆ getWaylandIviSurfaceID()

waylandIviSurfaceId_t ramses::DisplayConfig::getWaylandIviSurfaceID ( ) const

Get the current setting of IVI surface ID.

Returns
the current setting of IVI surface ID, returns waylandIviSurfaceId_t::Invalid() if no value has been set yet

◆ getWindowRectangle()

status_t ramses::DisplayConfig::getWindowRectangle ( int32_t &  x,
int32_t &  y,
uint32_t &  width,
uint32_t &  height 
) const

Get the window size and position in display pixel space, as it was specified by setWindowRectangle() or command line options These values have no relevance if window is set fullscreen.

Parameters
[out]xHorizontal offset (distance from left border of the display)
[out]yVertical offset (distance from top border of the display)
[out]widthWidth of the window
[out]heightHeight of the window
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ getWindowsWindowHandle()

void* ramses::DisplayConfig::getWindowsWindowHandle ( ) const

Get the current setting of the Windows window handle (HWND)

Returns
the current setting of the Windows window handle, returns nullptr if no value has been set yet

◆ getX11WindowHandle()

unsigned long ramses::DisplayConfig::getX11WindowHandle ( ) const

[Only for X11] Get the current setting of the X11 window handle

Returns
the current setting of the X11 window handle, returns numerical maximum value if no value has been set yet. The returned type is equivalent to
::Window 
from the X11 headers.

◆ isWindowFullscreen()

bool ramses::DisplayConfig::isWindowFullscreen ( ) const

Gets the currently set fullscreen state, which was set either via DisplayConfig::setWindowFullscreen or parsed from command line arguments.

Returns
True if this DisplayConfig is set to use fullscreen window, false otherwise.

◆ keepEffectsUploaded()

status_t ramses::DisplayConfig::keepEffectsUploaded ( bool  enable)

By default uploaded effects are kept forever in VRAM to avoid recompiling and reuploading. As their size is mostly negligible this should not have any disadvantages. If however it is desired to delete unused effects same as any other resources use this method to disable that optimization. Note that GPU cache can still prevent effect deletion (see ramses::DisplayConfig::setGPUMemoryCacheSize).

Parameters
[in]enableSet to true if effects should be always kept in VRAM (default), false if they should be deleted if unused as other resources
Returns
StatusOK on success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ operator=()

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

Deleted copy assignment.

Parameters
otherunused
Returns
unused

◆ setAndroidNativeWindow()

status_t ramses::DisplayConfig::setAndroidNativeWindow ( void *  nativeWindowPtr)

[Mandatory on Android] Set native window to use for rendering on Android.

Parameters
[in]nativeWindowPtrANativeWindow* which can be obtained with ANativeWindow_fromSurface() from a Java Surface object

No ownership is transferred, the user is responsible to call ANativeWindow_release after destroying the RAMSES Renderer.

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

◆ setAsyncEffectUploadEnabled()

static status_t ramses::DisplayConfig::setAsyncEffectUploadEnabled ( DisplayConfig config,
bool  enabled 
)
static

Sets whether async shader/effect compilation and upload should be enabled. By default async effect compile and upload is enabled.

Shader compilation can be a relatively slow and computationally intense task on some platforms. This can lead to undesirable performance overhead, i.e., if shader compilation stalls rendering and upload of other resources.

Enabling async effect upload lets the renderer create a shared context and a separate thread that are used exclusively for shader compilation and upload.

It is recommended to leave async effect compile and upload enabled, and to disable it only for development and debugging purposes when necessary. If async effect compile and upload is disabled using this function the renderer will still create the components normally used for this purpose, i.e., a shared context and an additional thread, but their logic will not be triggered. Instead, shaders will be compiled and uploaded within the rendering loop, i.e. potentially stalling rendering.

Parameters
[in]configThe display config to call this method on. This API is temporarily added in static fashion for ABI compatibility.
[in]enabledSet to true to enable async effect upload, false to disable it.
Returns
StatusOK on success, otherwise the returned status can be used to resolve to resolve error message using getStatusMessage()

◆ setClearColor()

status_t ramses::DisplayConfig::setClearColor ( float  red,
float  green,
float  blue,
float  alpha 
)

Sets the clear color of the displays framebuffer (Default=0.0, 0.0, 0.0, 1.0)

Parameters
[in]redclear value for red channel
[in]greenclear value for green channel
[in]blueclear value for blue channel
[in]alphaclear value for alpha channel
Returns
StatusOK on success, otherwise the returned status can be used to resolve to resolve error message using getStatusMessage()

◆ setDepthStencilBufferType()

static status_t ramses::DisplayConfig::setDepthStencilBufferType ( DisplayConfig config,
EDepthBufferType  depthBufferType 
)
static

Sets whether depth/stencil buffer should be created for the framebuffer of the display. The framebuffer always has a color buffer. By default depth-stencil buffer is created as well.

The set configuration will be passed to WGL/EGL, which uses this information as a lower-limit for the chosen configuration. If the configuration is not available exactly as requested, WGL/EGL will try the nearest configuration with the requested capabilities or more, e.g., if depth buffer is requested but stencil buffer is not it can happen that a stencil buffer will still be created because WGL/EGL does not have a configuration with that specific description.

Parameters
[in]configThe display config to call this method on. This API is temporarily added in static fashion for ABI compatibility.
[in]depthBufferTypeConfigure depth and stencil buffers.
Returns
StatusOK on success, otherwise the returned status can be used to resolve to resolve error message using getStatusMessage()

◆ setGPUMemoryCacheSize()

status_t ramses::DisplayConfig::setGPUMemoryCacheSize ( uint64_t  size)

Set the amount of GPU memory in bytes that will be used as cache for resources. Uploaded resources are kept in GPU memory even if not in use by any scene anymore. They are only freed from memory in order to make space for new resources to be uploaded which would not fit in the cache otherwise. First in first out method is used when deciding which unused resource to remove from cache.

Note that the cache size does not act as hard limit, the renderer can still upload resources taking up more space. As long as cache limit is exceeded, newly unused resources are unloaded immediately.

Only client resources are considered for this cache, not scene resources (eg. render targets/render buffers). Cache is disabled by default (size is 0).

Parameters
[in]sizeGPU resource cache size in bytes. Disabled if 0 (default)
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setIntegrityRGLDeviceUnit()

status_t ramses::DisplayConfig::setIntegrityRGLDeviceUnit ( uint32_t  rglDeviceUnit)

[Mandatory on Integrity] Set device unit number to use when creating the display window on Integrity using RGL Window Manager API.

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

◆ setMultiSampling()

status_t ramses::DisplayConfig::setMultiSampling ( uint32_t  numSamples)

Set number of samples to be used for multisampled rendering.

Valid values are 1, 2, 4 or 8. Default value is 1 meaning multisampling is disabled. This value is just a hint for the device, the actual number of samples is guaranteed to be at least the given value but can be also more than that depending on device driver implementation. Ramses cannot check the device capability before the display is created, therefore exceeding the maximum number of samples supported by the device will likely result in fatal error.

Parameters
[in]numSamplesNumber of samples per pixel.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setPlatformRenderNode()

status_t ramses::DisplayConfig::setPlatformRenderNode ( const char *  renderNode)

Set the render node to use for creating GBM buffer objects used for creating DMA Offscreen buffers on platforms that support creation of DMA buffers.

Set the socket of a DRM driver's render node to load and create a GBM (Generic Buffer Manager) device. If the socket is opened successfully a GBM device is created using gbm_create_device. The GBM device can be used to create DMA buffers which act as regular offscreen buffers but also allow direct memory access from application's side. This can be helpful for use cases that require CPU read or write of memory that is used for rendering as well.

Setting a valid render node is a pre-requisite to creating DMA offscreen buffers using ramses::RamsesRenderer::createDmaOffscreenBuffer. Setting an invalid render node, or failing to create a GBM device using the passed render node will result in display creation failure.

Parameters
[in]renderNodeRender node used to load for creating of GBM device using gbm_create_device
Returns
StatusOK on success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setResizable()

status_t ramses::DisplayConfig::setResizable ( bool  resizable)

Enables/disables resizing of the window (Default=Disabled)

Parameters
[in]resizableThe resizable flag
Returns
StatusOK on success, otherwise the returned status can be used to resolve to resolve error message using getStatusMessage()

◆ setResourceUploadBatchSize()

status_t ramses::DisplayConfig::setResourceUploadBatchSize ( uint32_t  batchSize)

Sets the batch size for resource uploads.

The resource upload batch size defines the number of resources that should be uploaded in a single step. Time budgets (ramses::RamsesRenderer::setFrameTimerLimits) are checked at the latest when a batch was uploaded. It should be safe to configure a batch size of 1 unless time measurement has a significant performance impact on the target device. The batch size may not be 0.

Parameters
[in]batchSizethe number of resources to upload in a single step (default: 10)
Returns
StatusOK on success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setScenePriority()

status_t ramses::DisplayConfig::setScenePriority ( sceneId_t  sceneId,
int32_t  priority 
)

Specifies the scene's priority on this display.

The renderer will apply scene updates according to scene priority so that there will be less latency between client scene flush and rendering for scenes with higher priority. This could result in more latency for scenes with less priority. This setting should be used in combination with time budgets for resource uploads (ramses::RamsesRenderer::setFrameTimerLimits) to get the desired effect.

Default priority is 0. Higher values mean less priority. (Use negative values to increase priority)

Parameters
[in]sceneIdscene id of the preferred scene
[in]priorityscene priority. Higher value means less priority
Returns
StatusOK on success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setSwapInterval()

status_t ramses::DisplayConfig::setSwapInterval ( int32_t  interval)

Specifies the minimum number of video frames that are displayed before a buffer swap will occur.

If interval is set to 0, buffer swaps are not synchronized to a video frame. Interval is silently clamped to a platform specific minimum and maximum value. Default value is platform dependent.

Parameters
[in]intervalMinimum number of video frames that are displayed before a buffer swap will occur
Returns
StatusOK on success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setSystemCompositorWaylandDisplay()

status_t ramses::DisplayConfig::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().

◆ setWaylandDisplay()

status_t ramses::DisplayConfig::setWaylandDisplay ( const char *  waylandDisplay)

Set the Wayland display name to connect 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::DisplayConfig::setWaylandEmbeddedCompositingSocketFD ( int  socketFileDescriptor)

Set the file descriptor for the embedded compositor display socket.

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::DisplayConfig::setWaylandEmbeddedCompositingSocketGroup ( const char *  groupname)

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

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::DisplayConfig::setWaylandEmbeddedCompositingSocketName ( const char *  socketname)

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

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::DisplayConfig::setWaylandEmbeddedCompositingSocketPermissions ( uint32_t  permissions)

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

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().

◆ setWaylandIviLayerID()

status_t ramses::DisplayConfig::setWaylandIviLayerID ( waylandIviLayerId_t  waylandIviLayerID)

[Mandatory on Wayland] Set IVI layer ID to use for attaching the IVI surface created by the display.

RAMSES does not try to create the layer, instead the layer must be already existing before creating the display. Trying to create a display on Wayland without setting this variable or giving it a non-valid layer ID, e.g., the ID of a non-existing layer, will result in display creation failure.

This values is ignored on other systems than Wayland.

Parameters
[in]waylandIviLayerIDIVI layer ID to use for attaching the surface used by the display
Returns
StatusOK on success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setWaylandIviSurfaceID()

status_t ramses::DisplayConfig::setWaylandIviSurfaceID ( waylandIviSurfaceId_t  waylandIviSurfaceID)

[Mandatory on Wayland] Set IVI surface ID to use when creating the display window on Wayland.

  • This is the Wayland IVI surface ID, i.e. the ID that the display reports to Wayland so that the surface (=window) can be controlled over the system compositor controller
  • If the surface is not already existing it will be created during display creation
Parameters
[in]waylandIviSurfaceIDIVI surface ID to use for the display window
Returns
StatusOK on success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setWindowBorderless()

status_t ramses::DisplayConfig::setWindowBorderless ( bool  borderless)

Sets window hints/properties to tell the window manager to disable window borders.

Parameters
[in]borderlessflag specifying whether window should be drawn without window-border
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setWindowFullscreen()

status_t ramses::DisplayConfig::setWindowFullscreen ( bool  fullscreen)

Automatically sets the window size so that it fills the entire display. Overrides DisplayConfig::setWindowRectangle() when set to true.

Parameters
[in]fullscreenFlag specifying whether window should be fullscreen
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setWindowIviVisible()

status_t ramses::DisplayConfig::setWindowIviVisible ( )

Set IVI window to be visible right after window creation.

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

◆ setWindowRectangle()

status_t ramses::DisplayConfig::setWindowRectangle ( int32_t  x,
int32_t  y,
uint32_t  width,
uint32_t  height 
)

Sets the window size and position in display pixel space. This is ignored if window is set fullscreen.

Parameters
[in]xHorizontal offset (distance from left border of the display)
[in]yVertical offset (distance from top border of the display)
[in]widthWidth of the window
[in]heightHeight of the window
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setWindowsWindowHandle()

status_t ramses::DisplayConfig::setWindowsWindowHandle ( void *  hwnd)

[Only for Windows] Set the HWND handle to create a ramses display from an existing HWND window on a Window platform.

  • This method is platform dependent!
  • On other systems except for Windows, calling this method has no meaning
Parameters
[in]hwndWindows window handle to use for the display window
Returns
StatusOK on success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setX11WindowHandle()

status_t ramses::DisplayConfig::setX11WindowHandle ( unsigned long  x11WindowHandle)

[Only for X11] Set the X11 window handle to create a ramses display from an existing X11 window.

  • This method is platform dependent!
  • On other backends except for X11, the value has no meaning
Parameters
[in]x11WindowHandlenative X11 window id to use for the display window. The type is equivalent to
::Window 
from the X11 headers.
Returns
StatusOK on success, otherwise the returned status can be used to resolve error message using getStatusMessage().

Member Data Documentation

◆ impl

class DisplayConfigImpl& ramses::DisplayConfig::impl

Stores internal data for implementation specifics of DisplayConfig.


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