RAMSES Documentation  27.0.130
Information for RAMSES users and developers
DisplayConfig.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2015 BMW Car IT GmbH
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_RENDERERAPI_DISPLAYCONFIG_H
10 #define RAMSES_RENDERERAPI_DISPLAYCONFIG_H
11 
15 
16 namespace ramses
17 {
22  {
23  public:
28 
35  DisplayConfig(int32_t argc, char const* const* argv);
36 
42 
46  virtual ~DisplayConfig();
47 
59  status_t setWindowRectangle(int32_t x, int32_t y, uint32_t width, uint32_t height);
60 
72  status_t getWindowRectangle(int32_t& x, int32_t& y, uint32_t& width, uint32_t& height) const;
73 
82  status_t setWindowFullscreen(bool fullscreen);
83 
89  bool isWindowFullscreen() const;
90 
98  status_t setWindowBorderless(bool borderless);
99 
114  status_t setMultiSampling(uint32_t numSamples);
115 
123  status_t getMultiSamplingSamples(uint32_t& numSamples) const;
124 
133 
148 
155 
168 
175 
184  status_t setIntegrityRGLDeviceUnit(uint32_t rglDeviceUnit);
185 
191  uint32_t getIntegrityRGLDeviceUnit() const;
192 
198  void* getAndroidNativeWindow() const;
199 
210  status_t setAndroidNativeWindow(void* nativeWindowPtr);
211 
219 
233 
253 
261  status_t setResizable(bool resizable);
262 
273  status_t setClearColor(float red, float green, float blue, float alpha);
274 
293 
305  status_t setX11WindowHandle(unsigned long x11WindowHandle);
306 
313  unsigned long getX11WindowHandle() const;
314 
326 
332  void* getWindowsWindowHandle() const;
333 
342  status_t setWaylandDisplay(const char* waylandDisplay);
343 
349  const char* getWaylandDisplay() const;
350 
374  static status_t setAsyncEffectUploadEnabled(DisplayConfig& config, bool enabled);
375 
407 
414 
423 
453 
473 
482  status_t setSystemCompositorWaylandDisplay(const char* waylandDisplay);
483 
503  status_t setPlatformRenderNode(const char* renderNode);
504 
516  status_t setSwapInterval(int32_t interval);
517 
534  status_t setScenePriority(sceneId_t sceneId, int32_t priority);
535 
550 
554  class DisplayConfigImpl& impl;
555 
561  DisplayConfig& operator=(const DisplayConfig& other) = delete;
562  };
563 }
564 
565 #endif
#define RAMSES_API
Definition: APIExport.h:35
The DisplayConfig holds a set of parameters to be used to initialize a display.
Definition: DisplayConfig.h:22
status_t setWaylandIviSurfaceID(waylandIviSurfaceId_t waylandIviSurfaceID)
[Mandatory on Wayland] Set IVI surface ID to use when creating the display window on Wayland.
virtual ~DisplayConfig()
Destructor of DisplayConfig.
status_t setWaylandDisplay(const char *waylandDisplay)
Set the Wayland display name to connect to. This will override the default behavior which is to use W...
uint32_t getIntegrityRGLDeviceUnit() const
Get the current setting of RGL device unit number.
status_t setResourceUploadBatchSize(uint32_t batchSize)
Sets the batch size for resource uploads.
status_t enableWarpingPostEffect()
Enable warping post effect. User has to set warping mesh data later in the display,...
status_t setSwapInterval(int32_t interval)
Specifies the minimum number of video frames that are displayed before a buffer swap will occur.
status_t setWindowBorderless(bool borderless)
Sets window hints/properties to tell the window manager to disable window borders.
const char * getWaylandEmbeddedCompositingSocketName() const
Get the current setting of embedded compositing display socket name.
status_t setPlatformRenderNode(const char *renderNode)
Set the render node to use for creating GBM buffer objects used for creating DMA Offscreen buffers on...
DisplayConfig & operator=(const DisplayConfig &other)=delete
Deleted copy assignment.
class DisplayConfigImpl & impl
Definition: DisplayConfig.h:554
static status_t setDepthStencilBufferType(DisplayConfig &config, EDepthBufferType depthBufferType)
Sets whether depth/stencil buffer should be created for the framebuffer of the display....
status_t setGPUMemoryCacheSize(uint64_t size)
Set the amount of GPU memory in bytes that will be used as cache for resources. Uploaded resources ar...
status_t setWaylandEmbeddedCompositingSocketName(const char *socketname)
Set the name to be used for the embedded compositing display socket name.
status_t setScenePriority(sceneId_t sceneId, int32_t priority)
Specifies the scene's priority on this display.
status_t setWaylandEmbeddedCompositingSocketPermissions(uint32_t permissions)
Request that the embedded compositing display socket obtains the permissions given.
status_t setWindowIviVisible()
Set IVI window to be visible right after window creation.
status_t setAndroidNativeWindow(void *nativeWindowPtr)
[Mandatory on Android] Set native window to use for rendering on Android.
status_t setIntegrityRGLDeviceUnit(uint32_t rglDeviceUnit)
[Mandatory on Integrity] Set device unit number to use when creating the display window on Integrity ...
void * getAndroidNativeWindow() const
Get the current setting of Android native window.
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() ...
status_t setWindowFullscreen(bool fullscreen)
Automatically sets the window size so that it fills the entire display. Overrides DisplayConfig::setW...
DisplayConfig(const DisplayConfig &other)
Copy constructor of DisplayConfig.
status_t getMultiSamplingSamples(uint32_t &numSamples) const
Get number of samples currently set.
status_t setWindowsWindowHandle(void *hwnd)
[Only for Windows] Set the HWND handle to create a ramses display from an existing HWND window on a W...
DisplayConfig(int32_t argc, char const *const *argv)
Constructor of DisplayConfig that takes command line parameters and parses them to initialize the par...
status_t setWaylandIviLayerID(waylandIviLayerId_t waylandIviLayerID)
[Mandatory on Wayland] Set IVI layer ID to use for attaching the IVI surface created by the display.
static status_t setAsyncEffectUploadEnabled(DisplayConfig &config, bool enabled)
Sets whether async shader/effect compilation and upload should be enabled. By default async effect co...
status_t setX11WindowHandle(unsigned long x11WindowHandle)
[Only for X11] Set the X11 window handle to create a ramses display from an existing X11 window.
bool isWindowFullscreen() const
Gets the currently set fullscreen state, which was set either via DisplayConfig::setWindowFullscreen ...
status_t setWaylandEmbeddedCompositingSocketFD(int socketFileDescriptor)
Set the file descriptor for the embedded compositor display socket.
DisplayConfig()
Default constructor of DisplayConfig.
waylandIviSurfaceId_t getWaylandIviSurfaceID() const
Get the current setting of IVI surface ID.
status_t keepEffectsUploaded(bool enable)
By default uploaded effects are kept forever in VRAM to avoid recompiling and reuploading....
const char * getWaylandDisplay() const
Get the current setting of Wayland display name.
status_t setResizable(bool resizable)
Enables/disables resizing of the window (Default=Disabled)
status_t setMultiSampling(uint32_t numSamples)
Set number of samples to be used for multisampled rendering.
void * getWindowsWindowHandle() const
Get the current setting of the Windows window handle (HWND)
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...
unsigned long getX11WindowHandle() const
[Only for X11] Get the current setting of the X11 window handle
status_t setWaylandEmbeddedCompositingSocketGroup(const char *groupname)
Request that the embedded compositing display socket belongs to the given group.
waylandIviLayerId_t getWaylandIviLayerID() const
Get the ID of the Wayland IVI layer to which the IVI surface used by the display is attached.
status_t setSystemCompositorWaylandDisplay(const char *waylandDisplay)
Set the Wayland display name to connect system compositor to. This will override the default behavior...
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)
The StatusObject provides status message handling.
Definition: StatusObject.h:22
Helper class to create strongly typed values out of various types.
Definition: StronglyTypedValue.h:23
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
EDepthBufferType
Specifies type of depth buffer created within an offscreen buffer.
Definition: Types.h:288
uint32_t status_t
Status is a handle to the result of an API call.
Definition: RamsesFrameworkTypes.h:26