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

The Scene holds a scene graph. It is the essential class for distributing content to the ramses system. More...

#include <Scene.h>

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

Public Member Functions

status_t publish (EScenePublicationMode publicationMode=EScenePublicationMode_LocalAndRemote)
 Publishes the scene to the ramses system. More...
 
status_t unpublish ()
 Unpublish the scene from the ramses system. More...
 
bool isPublished () const
 Returns whether scene is currently published to the ramses system. More...
 
sceneId_t getSceneId () const
 Returns scene id defined at scene creation time. More...
 
status_t saveToFile (const char *fileName, bool compress) const
 Saves all scene contents to a file. More...
 
PerspectiveCameracreatePerspectiveCamera (const char *name=nullptr)
 Creates a Perspective Camera in this Scene. More...
 
OrthographicCameracreateOrthographicCamera (const char *name=nullptr)
 Creates a Orthographic Camera in this Scene. More...
 
AppearancecreateAppearance (const Effect &effect, const char *name=nullptr)
 Creates a new Appearance. More...
 
GeometryBindingcreateGeometryBinding (const Effect &effect, const char *name=nullptr)
 Creates a new GeometryBinding. More...
 
StreamTexturecreateStreamTexture (const Texture2D &fallbackTexture, waylandIviSurfaceId_t source, const char *name=nullptr)
 Create a Stream Texture. More...
 
NodecreateNode (const char *name=nullptr)
 Creates a scene graph node. The basic purpose of Node is to define topology in scene graph by links to parent and children nodes. Node can also hold transformation which is then propagated to children, thus defining a transformation topology. By default Node has identity transformation. Node can also hold visibility information which is propagated to children, thus defining a visibility topology. By default Node is visible, making a Node invisible makes also its whole subgraph invisible regardless of sub-nodes' visibility state. More...
 
MeshNodecreateMeshNode (const char *name=nullptr)
 Creates a scene graph MeshNode. MeshNode is a Node with additional properties and bindings that represent a renderable geometry with appearance. More...
 
status_t destroy (SceneObject &object)
 Destroys a previously created object using this scene The object must be owned by this scene in order to be destroyed. The reference to the object is no longer valid after it is destroyed. SceneObjects will automatically be destroyed once the scene is destroyed. More...
 
status_t setExpirationTimestamp (uint64_t ptpExpirationTimestampInMilliseconds)
 Expiration timestamp is a point in time till which the scene is considered to be up-to-date. More...
 
status_t flush (sceneVersionTag_t sceneVersionTag=InvalidSceneVersionTag)
 Commits all changes done to the scene since the last flush or since scene creation. This makes a new valid scene state available to all local and remote renderers. More...
 
status_t resetUniformTimeMs ()
 resets the semantic uniform ramses::EEffectUniformSemantic::TimeMs The uniform value will contain the time elapsed since this method was called for the last time. Use this method to avoid possible overflow issues. The reset will be applied to the rendered scene with the next flush. More...
 
int32_t getUniformTimeMs () const
 Gets the current value used for the semantic uniform ramses::EEffectUniformSemantic::TimeMs Value wraps to 0 every ~24 days, measured from the beginning of synchronized clock epoch. More...
 
const RamsesObjectfindObjectByName (const char *name) const
 Get an object from the scene by name. More...
 
RamsesObjectfindObjectByName (const char *name)
 Get an object from the scene by name. More...
 
const SceneObjectfindObjectById (sceneObjectId_t id) const
 Get an object from the scene by id. More...
 
SceneObjectfindObjectById (sceneObjectId_t id)
 Get an object from the scene by id. More...
 
RenderGroupcreateRenderGroup (const char *name=nullptr)
 Create a RenderGroup instance in the scene. More...
 
RenderPasscreateRenderPass (const char *name=nullptr)
 Create a render pass in the scene. More...
 
BlitPasscreateBlitPass (const RenderBuffer &sourceRenderBuffer, const RenderBuffer &destinationRenderBuffer, const char *name=nullptr)
 Create a blit pass in the scene. Source and destination render buffers must have same type, format and dimensions. By default the blitting region is set to the whole render buffers. More...
 
RenderBuffercreateRenderBuffer (uint32_t width, uint32_t height, ERenderBufferType bufferType, ERenderBufferFormat bufferFormat, ERenderBufferAccessMode accessMode, uint32_t sampleCount=0u, const char *name=nullptr)
 Create a RenderBuffer to be used with RenderTarget for rendering into and TextureSampler for sampling from. More...
 
PickableObjectcreatePickableObject (const ArrayBuffer &geometryBuffer, const pickableObjectId_t id, const char *name=nullptr)
 Create a PickableObject. More...
 
RenderTargetcreateRenderTarget (const RenderTargetDescription &rtDesc, const char *name=nullptr)
 Create a render target providing a set of RenderBuffers. More...
 
TextureSamplercreateTextureSampler (ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const Texture2D &texture, uint32_t anisotropyLevel=1, const char *name=nullptr)
 Creates a texture sampler object. More...
 
TextureSamplercreateTextureSampler (ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureAddressMode wrapRMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const Texture3D &texture, const char *name=nullptr)
 Creates a texture sampler object. More...
 
TextureSamplercreateTextureSampler (ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const TextureCube &texture, uint32_t anisotropyLevel=1, const char *name=nullptr)
 Creates a texture sampler object. More...
 
TextureSamplercreateTextureSampler (ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const RenderBuffer &renderBuffer, uint32_t anisotropyLevel=1, const char *name=nullptr)
 Creates a texture sampler object. More...
 
TextureSamplercreateTextureSampler (ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const Texture2DBuffer &texture2DBuffer, uint32_t anisotropyLevel=1, const char *name=nullptr)
 Creates a texture sampler object for mutable texture. More...
 
TextureSamplercreateTextureSampler (ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const StreamTexture &streamTexture, const char *name=nullptr)
 Creates a texture sampler object. More...
 
TextureSamplerMScreateTextureSamplerMS (const RenderBuffer &renderBuffer, const char *name)
 Creates a multisampled texture sampler object. More...
 
TextureSamplerExternalcreateTextureSamplerExternal (ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const char *name=nullptr)
 Creates a texture sampler object that can sample from external textures. More...
 
ArrayResourcecreateArrayResource (EDataType type, uint32_t numElements, const void *arrayData, resourceCacheFlag_t cacheFlag=ResourceCacheFlag_DoNotCache, const char *name=nullptr)
 Create a new ArrayResource. It makes a copy of the given data of a certain type as a resource, an immutable data object. See ramses::ArrayResource for more details. More...
 
Texture2DcreateTexture2D (ETextureFormat format, uint32_t width, uint32_t height, uint32_t mipMapCount, const MipLevelData mipLevelData[], bool generateMipChain=false, const TextureSwizzle &swizzle={}, resourceCacheFlag_t cacheFlag=ResourceCacheFlag_DoNotCache, const char *name=nullptr)
 Create a new Texture2D. It makes a copy of the given data of a certain type as a resource, an immutable data object. See ramses::Texture2D for more details. See ramses::MipLevelData for more details on expected texel alignment. More...
 
Texture3DcreateTexture3D (ETextureFormat format, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipMapCount, const MipLevelData mipLevelData[], bool generateMipChain=false, resourceCacheFlag_t cacheFlag=ResourceCacheFlag_DoNotCache, const char *name=nullptr)
 Create a new Texture3D. It makes a copy of the given data of a certain type as a resource, an immutable data object. See ramses::Texture3D for more details. See ramses::MipLevelData for more details on expected texel alignment. More...
 
TextureCubecreateTextureCube (ETextureFormat format, uint32_t size, uint32_t mipMapCount, const CubeMipLevelData mipLevelData[], bool generateMipChain=false, const TextureSwizzle &swizzle={}, resourceCacheFlag_t cacheFlag=ResourceCacheFlag_DoNotCache, const char *name=nullptr)
 Create a new Cube Texture. It makes a copy of the given data of a certain type as a resource, an immutable data object. All texel values are initially initialized to 0. See ramses::TextureCube for more details. See ramses::CubeMipLevelData for more details on expected texel alignment. More...
 
EffectcreateEffect (const EffectDescription &effectDesc, resourceCacheFlag_t cacheFlag=ResourceCacheFlag_DoNotCache, const char *name=nullptr)
 Create a new Effect by parsing a GLSL shader described by an EffectDescription instance. Refer to RamsesClient::getLastEffectErrorMessages in case of parsing error. See ramses::Effect for more details. More...
 
std::string getLastEffectErrorMessages () const
 Get the GLSL error messages that were produced at the creation of the last Effect. More...
 
ArrayBuffercreateArrayBuffer (EDataType dataType, uint32_t maxNumElements, const char *name=nullptr)
 Create a new ramses::ArrayBuffer. The created object is a mutable buffer object that can be used as index or as vertex buffer in ramses::GeometryBinding. More...
 
Texture2DBuffercreateTexture2DBuffer (ETextureFormat textureFormat, uint32_t width, uint32_t height, uint32_t mipLevelCount, const char *name=nullptr)
 Create a new Texture2DBuffer. The created object is a mutable buffer object that can be used as a texture in TextureSampler. The created object has mutable contents and immutable size that has to be specified at creation time. Upon creation the contents are undefined. The contents of the object can be (partially) updated, the change to the object data is transferred to renderer on next flush. More...
 
DataFloatcreateDataFloat (const char *name=nullptr)
 Creates a data object within the scene, which holds a data value of type float. More...
 
DataVector2fcreateDataVector2f (const char *name=nullptr)
 Creates a data object within the scene, which holds a data value of type Vector2f. More...
 
DataVector3fcreateDataVector3f (const char *name=nullptr)
 Creates a data object within the scene, which holds a data value of type Vector3f. More...
 
DataVector4fcreateDataVector4f (const char *name=nullptr)
 Creates a data object within the scene, which holds a data value of type Vector4f. More...
 
DataMatrix22fcreateDataMatrix22f (const char *name=nullptr)
 Creates a data object within the scene, which holds a data value of type Matrix22f. More...
 
DataMatrix33fcreateDataMatrix33f (const char *name=nullptr)
 Creates a data object within the scene, which holds a data value of type Matrix33f. More...
 
DataMatrix44fcreateDataMatrix44f (const char *name=nullptr)
 Creates a data object within the scene, which holds a data value of type Matrix44f. More...
 
DataInt32createDataInt32 (const char *name=nullptr)
 Creates a data object within the scene, which holds a data value of type int32. More...
 
DataVector2icreateDataVector2i (const char *name=nullptr)
 Creates a data object within the scene, which holds a data value of type Vector2i. More...
 
DataVector3icreateDataVector3i (const char *name=nullptr)
 Creates a data object within the scene, which holds a data value of type Vector3i. More...
 
DataVector4icreateDataVector4i (const char *name=nullptr)
 Creates a data object within the scene, which holds a data value of type Vector4i. More...
 
status_t createTransformationDataProvider (const Node &node, dataProviderId_t dataId)
 Annotates a Node as a transformation data provider. Data provider and data consumer can be linked on Ramses Renderer side. Linking data means that the consumer's data property will be overridden by provider's data property. More...
 
status_t createTransformationDataConsumer (const Node &node, dataConsumerId_t dataId)
 Annotates a Node as a transformation data consumer. Data provider and data consumer can be linked on Ramses Renderer side. Linking data means that the consumer's data property will be overridden by provider's data property. More...
 
status_t createDataProvider (const DataObject &dataObject, dataProviderId_t dataId)
 Annotates a DataObject as a data provider. Data provider and data consumer can be linked on Ramses Renderer side. Linking data means that the consumer's data property will be overridden by provider's data property. More...
 
status_t createDataConsumer (const DataObject &dataObject, dataConsumerId_t dataId)
 Annotates a DataObject as a data consumer. Data provider and data consumer can be linked on Ramses Renderer side. Linking data means that the consumer's data property will be overridden by provider's data property. More...
 
status_t createTextureProvider (const Texture2D &texture, dataProviderId_t dataId)
 Annotates a Texture2D as a content provider. Texture provider and texture consumer can be linked on Ramses Renderer side. Linking textures means that the consumer's sampler will use provider's texture as content. More...
 
status_t updateTextureProvider (const Texture2D &texture, dataProviderId_t dataId)
 Sets a new texture to an existing provider. This allows the provider to change the provided content which is then automatically applied to all linked consumers on the renderer side without the need to recreate or relink any provider/consumer. More...
 
status_t createTextureConsumer (const TextureSampler &sampler, dataConsumerId_t dataId)
 Annotates a ramses::TextureSampler as a content consumer. Texture provider and texture consumer can be linked on Ramses Renderer side. Linking textures means that the consumer's sampler will use provider's texture as content. More...
 
status_t createTextureConsumer (const TextureSamplerMS &sampler, dataConsumerId_t dataId)
 Annotates a ramses::TextureSamplerMS as a content consumer. Texture provider and texture consumer can be linked on Ramses Renderer side. Linking textures means that the consumer's sampler will use provider's texture as content. More...
 
status_t createTextureConsumer (const TextureSamplerExternal &sampler, dataConsumerId_t dataId)
 Annotates a ramses::TextureSamplerExternal as a content consumer. Texture provider and texture consumer can be linked on Ramses Renderer side. Linking textures means that the consumer's sampler will use provider's texture as content. More...
 
AnimationSystemcreateAnimationSystem (uint32_t flags=EAnimationSystemFlags_Default, const char *name=nullptr)
 Create a new animation system. The animation system will be updated on renderer side after calls to AnimationSystem::setTime(). The animation system is not automatically updated on client side. If live updates of animated values are needed on client side, provide the creation flag EAnimationSystemFlags_ClientSideProcessing. Calls to AnimationSystem::setTime() then also update the animation systems client side state. More...
 
AnimationSystemRealTimecreateRealTimeAnimationSystem (uint32_t flags=EAnimationSystemFlags_Default, const char *name=nullptr)
 Create a new animation system that is designed to work with system time. The animation system will be updated automatically every frame on renderer side using its system time. The animation system is not automatically updated on client side. If live updates of animated values are needed on client side, provide the creation flag EAnimationSystemFlags_ClientSideProcessing, and make sure to call AnimationSystem::updateLocalTime() before accessing any values. Calls to AnimationSystem::updateLocalTime() are also mandatory before any client side changes to the state of the animation system. More...
 
SceneReferencecreateSceneReference (sceneId_t referencedScene, const char *name=nullptr)
 Creates a new SceneReference object. More...
 
status_t linkData (SceneReference *providerReference, dataProviderId_t providerId, SceneReference *consumerReference, dataConsumerId_t consumerId)
 Tell the RamsesRenderer to link a data provider to a data consumer across two scenes. More...
 
status_t unlinkData (SceneReference *consumerReference, dataConsumerId_t consumerId)
 Removes an existing link between two scenes (see ramses::Scene::linkData). More...
 
RamsesClientgetRamsesClient ()
 Getter for ramses::RamsesClient this Scene was created from. More...
 
const ResourcegetResource (resourceId_t id) const
 Get a resource which is owned by the scene by id. More...
 
ResourcegetResource (resourceId_t id)
 Get a resource which is owned by the scene by id. More...
 
- Public Member Functions inherited from ramses::RamsesObject
const char * getName () const
 Returns the name of the object. More...
 
status_t setName (const char *name)
 Changes the name of the object. More...
 
ERamsesObjectType getType () const
 Gets type of the object. More...
 
bool isOfType (ERamsesObjectType type) const
 Checks if the object is of given type. 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

SceneImpl & impl
 
- Public Attributes inherited from ramses::ClientObject
class ClientObjectImpl & impl
 
- Public Attributes inherited from ramses::RamsesObject
class RamsesObjectImpl & impl
 
- Public Attributes inherited from ramses::StatusObject
class StatusObjectImpl & impl
 

Protected Member Functions

 Scene (SceneImpl &pimpl)
 Constructor of the Scene. More...
 
 Scene (const Scene &other)
 Copy constructor of Scene. More...
 
Sceneoperator= (const Scene &other)
 Assignment operator of Scene. More...
 
virtual ~Scene ()
 Destructor of the Scene. More...
 
- Protected Member Functions inherited from ramses::ClientObject
 ClientObject (ClientObjectImpl &pimpl)
 Constructor for ClientObject. More...
 
virtual ~ClientObject ()
 Destructor of the ClientObject. More...
 
- Protected Member Functions inherited from ramses::RamsesObject
 RamsesObject (RamsesObjectImpl &pimpl)
 Constructor for RamsesObject. More...
 
virtual ~RamsesObject ()
 Destructor of the RamsesObject. More...
 
- Protected Member Functions inherited from ramses::StatusObject
 StatusObject (StatusObjectImpl &pimpl)
 Constructor for StatusObject. More...
 
virtual ~StatusObject ()
 Destructor of the StatusObject. More...
 

Friends

class RamsesClientImpl
 RamsesClient is the factory for creating Scene instances. More...
 

Detailed Description

The Scene holds a scene graph. It is the essential class for distributing content to the ramses system.

Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-dcsm-provider/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, 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, ramses-example-local-viewport-link/src/main.cpp, ramses-example-minimal/src/main.cpp, ramses-example-renderonce/src/main.cpp, ramses-example-text-basic/src/main.cpp, and ramses-example-text-languages/src/main.cpp.

Constructor & Destructor Documentation

◆ Scene() [1/2]

ramses::Scene::Scene ( SceneImpl &  pimpl)
explicitprotected

Constructor of the Scene.

Parameters
[in]pimplInternal data for implementation specifics of Scene (sink - instance becomes owner)

◆ Scene() [2/2]

ramses::Scene::Scene ( const Scene other)
protected

Copy constructor of Scene.

Parameters
[in]otherOther instance of Scene class

◆ ~Scene()

virtual ramses::Scene::~Scene ( )
protectedvirtual

Destructor of the Scene.

Member Function Documentation

◆ createAnimationSystem()

AnimationSystem* ramses::Scene::createAnimationSystem ( uint32_t  flags = EAnimationSystemFlags_Default,
const char *  name = nullptr 
)

Create a new animation system. The animation system will be updated on renderer side after calls to AnimationSystem::setTime(). The animation system is not automatically updated on client side. If live updates of animated values are needed on client side, provide the creation flag EAnimationSystemFlags_ClientSideProcessing. Calls to AnimationSystem::setTime() then also update the animation systems client side state.

Parameters
[in]flagsOptional creation flags for the animation system.
[in]nameThe optional name of the created animation system.
Returns
A reference to the created animation system.
Examples
ramses-example-basic-animation/src/main.cpp, and ramses-example-basic-file-loading/src/main.cpp.

◆ createAppearance()

Appearance* ramses::Scene::createAppearance ( const Effect effect,
const char *  name = nullptr 
)

◆ createArrayBuffer()

ArrayBuffer* ramses::Scene::createArrayBuffer ( EDataType  dataType,
uint32_t  maxNumElements,
const char *  name = nullptr 
)

Create a new ramses::ArrayBuffer. The created object is a mutable buffer object that can be used as index or as vertex buffer in ramses::GeometryBinding.

The created object has mutable contents and immutable size that has to be specified at creation time. Upon creation the contents are undefined. The contents of the object can be (partially) updated, the change to the object data is transferred to renderer on next flush.

Note: if an ramses::ArrayBuffer object is created with type ramses::EDataType::ByteBlob then an element is defined as one byte, rather than a logical vertex element. Hence, all functions of the class ramses::ArrayBuffer referring to element refer to a single byte within byte array, element size is 1 byte and max number of elements is the same as max size in bytes.

Parameters
[in]dataTypeData type of the array data.
[in]maxNumElementsThe maximum number of data elements this buffer can hold.
[in]nameThe optional name of the created array buffer.
Returns
A pointer to the created array buffer.
Examples
ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, and ramses-example-local-pick-handling/src/main.cpp.

◆ createArrayResource()

ArrayResource* ramses::Scene::createArrayResource ( EDataType  type,
uint32_t  numElements,
const void *  arrayData,
resourceCacheFlag_t  cacheFlag = ResourceCacheFlag_DoNotCache,
const char *  name = nullptr 
)

Create a new ArrayResource. It makes a copy of the given data of a certain type as a resource, an immutable data object. See ramses::ArrayResource for more details.

If an ramses::ArrayResource object is created with type ramses::EDataType::ByteBlob then an element is defined as one byte, rather than a logical vertex element. Hence, functions of the class ramses::ArrayResource referring to element refer to a single byte within byte array, element size is 1 byte and number of elements is the same as max size in bytes.

Parameters
[in]typeThe data type of the array elements.
[in]numElementsThe number of elements of the given data type to use for the resource.
[in]arrayDataPointer to the data to be used to create the array from.
[in]cacheFlagThe optional flag sent to the renderer. The value describes how the cache implementation should handle the resource.
[in]nameThe optional name of the ArrayResource.
Returns
A pointer to the created ArrayResource, null on failure
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/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, ramses-example-local-viewport-link/src/main.cpp, and ramses-example-renderonce/src/main.cpp.

◆ createBlitPass()

BlitPass* ramses::Scene::createBlitPass ( const RenderBuffer sourceRenderBuffer,
const RenderBuffer destinationRenderBuffer,
const char *  name = nullptr 
)

Create a blit pass in the scene. Source and destination render buffers must have same type, format and dimensions. By default the blitting region is set to the whole render buffers.

Parameters
[in]sourceRenderBufferRender buffer used as source to blit from
[in]destinationRenderBufferRender buffer used as destination to blit to
[in]nameThe optional name of the created blit pass.
Returns
A pointer to a BlitPass if successful or nullptr on failure.

◆ createDataConsumer()

status_t ramses::Scene::createDataConsumer ( const DataObject dataObject,
dataConsumerId_t  dataId 
)

Annotates a DataObject as a data consumer. Data provider and data consumer can be linked on Ramses Renderer side. Linking data means that the consumer's data property will be overridden by provider's data property.

Parameters
[in]dataObjectwhich shall consume data from another DataObject.
[in]dataIdid to reference the consumer in this scene
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-local-datalink/src/main.cpp, ramses-example-local-scene-referencing/src/main.cpp, and ramses-example-local-viewport-link/src/main.cpp.

◆ createDataFloat()

DataFloat* ramses::Scene::createDataFloat ( const char *  name = nullptr)

Creates a data object within the scene, which holds a data value of type float.

Parameters
[in]nameoptional name of the object.
Returns
Pointer to the created DataFloat, null on failure.

◆ createDataInt32()

DataInt32* ramses::Scene::createDataInt32 ( const char *  name = nullptr)

Creates a data object within the scene, which holds a data value of type int32.

Parameters
[in]nameoptional name of the object.
Returns
Pointer to the created DataInt32, null on failure.

◆ createDataMatrix22f()

DataMatrix22f* ramses::Scene::createDataMatrix22f ( const char *  name = nullptr)

Creates a data object within the scene, which holds a data value of type Matrix22f.

Parameters
[in]nameoptional name of the object.
Returns
Pointer to the created Matrix22f, null on failure.

◆ createDataMatrix33f()

DataMatrix33f* ramses::Scene::createDataMatrix33f ( const char *  name = nullptr)

Creates a data object within the scene, which holds a data value of type Matrix33f.

Parameters
[in]nameoptional name of the object.
Returns
Pointer to the created Matrix33f, null on failure.

◆ createDataMatrix44f()

DataMatrix44f* ramses::Scene::createDataMatrix44f ( const char *  name = nullptr)

Creates a data object within the scene, which holds a data value of type Matrix44f.

Parameters
[in]nameoptional name of the object.
Returns
Pointer to the created Matrix44f, null on failure.

◆ createDataProvider()

status_t ramses::Scene::createDataProvider ( const DataObject dataObject,
dataProviderId_t  dataId 
)

Annotates a DataObject as a data provider. Data provider and data consumer can be linked on Ramses Renderer side. Linking data means that the consumer's data property will be overridden by provider's data property.

Parameters
[in]dataObjectfrom which data shall be provided.
[in]dataIdid to reference the provider in this scene
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-local-datalink/src/main.cpp, ramses-example-local-scene-referencing/src/main.cpp, and ramses-example-local-viewport-link/src/main.cpp.

◆ createDataVector2f()

DataVector2f* ramses::Scene::createDataVector2f ( const char *  name = nullptr)

Creates a data object within the scene, which holds a data value of type Vector2f.

Parameters
[in]nameoptional name of the object.
Returns
Pointer to the created DataVector2f, null on failure.

◆ createDataVector2i()

DataVector2i* ramses::Scene::createDataVector2i ( const char *  name = nullptr)

Creates a data object within the scene, which holds a data value of type Vector2i.

Parameters
[in]nameoptional name of the object.
Returns
Pointer to the created DataVector2i, null on failure.
Examples
ramses-example-local-scene-referencing/src/main.cpp, and ramses-example-local-viewport-link/src/main.cpp.

◆ createDataVector3f()

DataVector3f* ramses::Scene::createDataVector3f ( const char *  name = nullptr)

Creates a data object within the scene, which holds a data value of type Vector3f.

Parameters
[in]nameoptional name of the object.
Returns
Pointer to the created DataVector3f, null on failure.

◆ createDataVector3i()

DataVector3i* ramses::Scene::createDataVector3i ( const char *  name = nullptr)

Creates a data object within the scene, which holds a data value of type Vector3i.

Parameters
[in]nameoptional name of the object.
Returns
Pointer to the created DataVector3i, null on failure.

◆ createDataVector4f()

DataVector4f* ramses::Scene::createDataVector4f ( const char *  name = nullptr)

Creates a data object within the scene, which holds a data value of type Vector4f.

Parameters
[in]nameoptional name of the object.
Returns
Pointer to the created DataVector4f, null on failure.
Examples
ramses-example-local-scene-referencing/src/main.cpp, and ramses-example-local-viewport-link/src/main.cpp.

◆ createDataVector4i()

DataVector4i* ramses::Scene::createDataVector4i ( const char *  name = nullptr)

Creates a data object within the scene, which holds a data value of type Vector4i.

Parameters
[in]nameoptional name of the object.
Returns
Pointer to the created DataVector4i, null on failure.

◆ createEffect()

Effect* ramses::Scene::createEffect ( const EffectDescription effectDesc,
resourceCacheFlag_t  cacheFlag = ResourceCacheFlag_DoNotCache,
const char *  name = nullptr 
)

Create a new Effect by parsing a GLSL shader described by an EffectDescription instance. Refer to RamsesClient::getLastEffectErrorMessages in case of parsing error. See ramses::Effect for more details.

Parameters
[in]effectDescEffect description.
[in]cacheFlagThe optional flag sent to the renderer. The value describes how the cache implementation should handle the resource.
[in]nameThe name of the created Effect.
Returns
A pointer to the created Effect, null on failure
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/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, ramses-example-local-viewport-link/src/main.cpp, ramses-example-renderonce/src/main.cpp, ramses-example-text-basic/src/main.cpp, and ramses-example-text-languages/src/main.cpp.

◆ createGeometryBinding()

GeometryBinding* ramses::Scene::createGeometryBinding ( const Effect effect,
const char *  name = nullptr 
)

Creates a new GeometryBinding.

Parameters
[in]effectThe effect which is used to create the GeometryBinding.
[in]nameThe optional name of the created GeometryBinding.
Returns
A pointer to the created GeometryBinding, null on failure
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/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, ramses-example-local-viewport-link/src/main.cpp, and ramses-example-renderonce/src/main.cpp.

◆ createMeshNode()

MeshNode* ramses::Scene::createMeshNode ( const char *  name = nullptr)

Creates a scene graph MeshNode. MeshNode is a Node with additional properties and bindings that represent a renderable geometry with appearance.

Parameters
[in]nameThe optional name of the MeshNode.
Returns
Pointer to the created MeshNode, null on failure.
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/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, ramses-example-local-viewport-link/src/main.cpp, and ramses-example-renderonce/src/main.cpp.

◆ createNode()

Node* ramses::Scene::createNode ( const char *  name = nullptr)

Creates a scene graph node. The basic purpose of Node is to define topology in scene graph by links to parent and children nodes. Node can also hold transformation which is then propagated to children, thus defining a transformation topology. By default Node has identity transformation. Node can also hold visibility information which is propagated to children, thus defining a visibility topology. By default Node is visible, making a Node invisible makes also its whole subgraph invisible regardless of sub-nodes' visibility state.

Parameters
[in]nameOptional name of the object.
Returns
Pointer to the created Node, nullptr on failure.
Examples
ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, and ramses-example-renderonce/src/main.cpp.

◆ createOrthographicCamera()

OrthographicCamera* ramses::Scene::createOrthographicCamera ( const char *  name = nullptr)

◆ createPerspectiveCamera()

PerspectiveCamera* ramses::Scene::createPerspectiveCamera ( const char *  name = nullptr)

◆ createPickableObject()

PickableObject* ramses::Scene::createPickableObject ( const ArrayBuffer geometryBuffer,
const pickableObjectId_t  id,
const char *  name = nullptr 
)

Create a PickableObject.

PickableObject provides a way to specify a 'pickable' area, when this area is picked (see ramses::RamsesRenderer API) a message is sent to RamsesClient with list of picked objects, these can be dispatched and handled using ramses::IRendererEventHandler::objectsPicked. Geometry to specify PickableObject has to be of data type ramses::EDataType::Vector3F and every 3 elements are vertices forming a triangle. Geometry will be interpreted as triangle list (no indices used) - it should be a simplified representation of the actual renderable geometry that it is assigned to, typically a bounding box. PickableObject is a ramses::Node and as such can be placed in scene transformation topology, the vertices should therefore be in local (model) space and transformations will be applied according node topology when calculating picking. Geometry is defined in 3D coordinates but does not have to be volumetric, in fact when combined with the right camera (ramses::PickableObject::setCamera) it can represent a screen space area.

Parameters
[in]geometryBufferVertex buffer containing triangles defining geometry of PickableObject.
[in]idUser ID assigned to PickableObject, it will be used in callback ramses::IRendererEventHandler::objectsPicked when this PickableObject is picked.
[in]nameName of the PickableObject.
Returns
Pointer to the created PickableObject, nullptr on failure.
Examples
ramses-example-local-pick-handling/src/main.cpp.

◆ createRealTimeAnimationSystem()

AnimationSystemRealTime* ramses::Scene::createRealTimeAnimationSystem ( uint32_t  flags = EAnimationSystemFlags_Default,
const char *  name = nullptr 
)

Create a new animation system that is designed to work with system time. The animation system will be updated automatically every frame on renderer side using its system time. The animation system is not automatically updated on client side. If live updates of animated values are needed on client side, provide the creation flag EAnimationSystemFlags_ClientSideProcessing, and make sure to call AnimationSystem::updateLocalTime() before accessing any values. Calls to AnimationSystem::updateLocalTime() are also mandatory before any client side changes to the state of the animation system.

Parameters
[in]flagsOptional creation flags for the animation system.
[in]nameThe optional name of the created animation system.
Returns
A reference to the created animation system.
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/src/main.cpp, ramses-example-local-displays/src/main.cpp, ramses-example-local-geometry-shaders/src/main.cpp, and ramses-example-local-viewport-link/src/main.cpp.

◆ createRenderBuffer()

RenderBuffer* ramses::Scene::createRenderBuffer ( uint32_t  width,
uint32_t  height,
ERenderBufferType  bufferType,
ERenderBufferFormat  bufferFormat,
ERenderBufferAccessMode  accessMode,
uint32_t  sampleCount = 0u,
const char *  name = nullptr 
)

Create a RenderBuffer to be used with RenderTarget for rendering into and TextureSampler for sampling from.

A multisampled buffer will be created if sampleCount greater than 0, note that the value is just a hint for the device, the actual number of samples might be different depending on device driver implementation. If the number of samples exceeds device capabilities the number of samples it will be clamped to its maximum supported (creation will succeeded with a warning log).

Parameters
[in]widthThe width of the RenderBuffer in pixel.
[in]heightThe height of the RenderBuffer in pixel.
[in]bufferTypeType of the RenderBuffer to be created (color, depth, depth/stecil).
[in]bufferFormatData format to use for the RenderBuffer to be created.
[in]accessModeRead/Write access mode of render buffer
[in]sampleCountOptional sample count for MSAA number of samples. Default value is 0 for no MSAA.
[in]nameOptional name of the object.
Returns
Pointer to the created RenderBuffer, null on failure.
Examples
ramses-example-basic-rendertarget/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, and ramses-example-renderonce/src/main.cpp.

◆ createRenderGroup()

RenderGroup* ramses::Scene::createRenderGroup ( const char *  name = nullptr)

Create a RenderGroup instance in the scene.

Parameters
[in]nameThe optional name of the created RenderGroup instance.
Returns
A pointer to the created RenderGroup, null on failure
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/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, ramses-example-local-viewport-link/src/main.cpp, ramses-example-renderonce/src/main.cpp, ramses-example-text-basic/src/main.cpp, and ramses-example-text-languages/src/main.cpp.

◆ createRenderPass()

RenderPass* ramses::Scene::createRenderPass ( const char *  name = nullptr)

◆ createRenderTarget()

RenderTarget* ramses::Scene::createRenderTarget ( const RenderTargetDescription rtDesc,
const char *  name = nullptr 
)

Create a render target providing a set of RenderBuffers.

Parameters
[in]rtDescInstance of RenderTargetDescription holding all information needed to create a RenderTarget.
[in]nameOptional name of the object.
Returns
Pointer to the created RenderTarget, null on failure.
Examples
ramses-example-basic-rendertarget/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, and ramses-example-renderonce/src/main.cpp.

◆ createSceneReference()

SceneReference* ramses::Scene::createSceneReference ( sceneId_t  referencedScene,
const char *  name = nullptr 
)

Creates a new SceneReference object.

The SceneReference object references a scene, which might be unknown to this RamsesClient, but is or expected to be known to the RamsesRenderer subscribed to this scene. It allows to remotely change limited set of states of the referenced scene on renderer side. There can be only one instance of ramses::SceneReference referring to a sceneId across all RamsesClients connected to a RamsesRenderer. Creating more than one instance referring to the same sceneId in one RamsesClient will result in an error, multiple instances referring to the same sceneId across different RamsesClients results in undefined behavior. ramses::SceneReference can be destroyed and re-created but there are certain aspects to consider, see ramses::SceneReference for details. More than one level of referencing, i.e. a master scene being also a scene reference for another master scene, is currently not supported.

Parameters
[in]referencedSceneA scene id of a scene known to the RamsesRenderer.
[in]nameThe optional name of the created SceneReference.
Returns
A pointer to the created SceneReference.
Examples
ramses-example-local-scene-referencing/src/main.cpp.

◆ createStreamTexture()

StreamTexture* ramses::Scene::createStreamTexture ( const Texture2D fallbackTexture,
waylandIviSurfaceId_t  source,
const char *  name = nullptr 
)

Create a Stream Texture.

Parameters
[in]fallbackTextureTexture2D used as a fallback texture.
[in]sourceStream source identifier
[in]nameThe name of the Stream Texture.
Returns
A pointer to the created Stream Texture, null on failure.
Examples
ramses-example-basic-compositing/src/main.cpp, and ramses-example-local-dma-offscreenbuffer/src/main.cpp.

◆ createTexture2D()

Texture2D* ramses::Scene::createTexture2D ( ETextureFormat  format,
uint32_t  width,
uint32_t  height,
uint32_t  mipMapCount,
const MipLevelData  mipLevelData[],
bool  generateMipChain = false,
const TextureSwizzle swizzle = {},
resourceCacheFlag_t  cacheFlag = ResourceCacheFlag_DoNotCache,
const char *  name = nullptr 
)

Create a new Texture2D. It makes a copy of the given data of a certain type as a resource, an immutable data object. See ramses::Texture2D for more details. See ramses::MipLevelData for more details on expected texel alignment.

Parameters
[in]formatPixel format of the Texture2D data.
[in]widthWidth of the texture (mipmap level 0).
[in]heightHeight of the texture (mipmap level 0).
[in]mipMapCountNumber of mipmap levels contained in mipLevelData array.
[in]mipLevelDataArray of ramses::MipLevelData structs defining mipmap levels to use. Amount and sizes of supplied mipmap levels have to conform to GL specification. Order is lowest level (biggest resolution) to highest level (smallest resolution).
[in]swizzleDescribes how RGBA channels of the texture are swizzled, where each member of the struct represents one destination channel that the source channel should get sampled from.
[in]generateMipChainAuto generate mipmap levels. Cannot be used if custom data for lower mipmap levels provided.
[in]cacheFlagThe optional flag sent to the renderer. The value describes how the cache implementation should handle the resource.
[in]nameThe name of the Texture2D.
Returns
A pointer to the created Texture2D, null on failure. Will fail with data == nullptr and/or width/height == 0.
Examples
ramses-example-local-client-dcsm/src/main.cpp.

◆ createTexture2DBuffer()

Texture2DBuffer* ramses::Scene::createTexture2DBuffer ( ETextureFormat  textureFormat,
uint32_t  width,
uint32_t  height,
uint32_t  mipLevelCount,
const char *  name = nullptr 
)

Create a new Texture2DBuffer. The created object is a mutable buffer object that can be used as a texture in TextureSampler. The created object has mutable contents and immutable size that has to be specified at creation time. Upon creation the contents are undefined. The contents of the object can be (partially) updated, the change to the object data is transferred to renderer on next flush.

The sizes of mipmap levels are computed according to OpenGL specification (see documentation of glTexStorage2D). The mipLevelCount has to be consistent with the width and height, so that no mipMap will have size zero.

Parameters
[in]textureFormattexture format. Only uncompressed texture formats are supported
[in]widthwidth of the first and largest mipmap level.
[in]heightheight of the first and largest mipmap level.
[in]mipLevelCountNumber of mipmap levels created for the Texture2DBuffer.
[in]nameThe optional name of the created Texture2DBuffer.
Returns
A pointer to the created Texture2DBuffer.
Examples
ramses-example-data-buffers-texture/src/main.cpp.

◆ createTexture3D()

Texture3D* ramses::Scene::createTexture3D ( ETextureFormat  format,
uint32_t  width,
uint32_t  height,
uint32_t  depth,
uint32_t  mipMapCount,
const MipLevelData  mipLevelData[],
bool  generateMipChain = false,
resourceCacheFlag_t  cacheFlag = ResourceCacheFlag_DoNotCache,
const char *  name = nullptr 
)

Create a new Texture3D. It makes a copy of the given data of a certain type as a resource, an immutable data object. See ramses::Texture3D for more details. See ramses::MipLevelData for more details on expected texel alignment.

Parameters
[in]formatPixel format of the Texture3D data.
[in]widthWidth of the texture (mipmap level 0).
[in]heightHeight of the texture (mipmap level 0).
[in]depthDepth of the texture.
[in]mipMapCountNumber of mipmap levels contained in mipLevelData array.
[in]mipLevelDataArray of ramses::MipLevelData structs defining mipmap levels to use. Amount and sizes of supplied mipmap levels have to conform to GL specification. Order is lowest level (biggest resolution) to highest level (smallest resolution).
[in]generateMipChainAuto generate mipmap levels. Cannot be used if custom data for lower mipmap levels provided.
[in]cacheFlagThe optional flag sent to the renderer. The value describes how the cache implementation should handle the resource.
[in]nameThe name of the Texture3D.
Returns
A pointer to the created Texture3D, null on failure. Will fail with data == nullptr and/or width/height/depth == 0.

◆ createTextureConsumer() [1/3]

status_t ramses::Scene::createTextureConsumer ( const TextureSampler sampler,
dataConsumerId_t  dataId 
)

Annotates a ramses::TextureSampler as a content consumer. Texture provider and texture consumer can be linked on Ramses Renderer side. Linking textures means that the consumer's sampler will use provider's texture as content.

Parameters
[in]samplerwhich shall consume texture content from provider texture.
[in]dataIdid to reference the consumer in this scene
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-datalink/src/main.cpp, ramses-example-local-dma-offscreenbuffer/src/main.cpp, and ramses-example-local-offscreenbuffer/src/main.cpp.

◆ createTextureConsumer() [2/3]

status_t ramses::Scene::createTextureConsumer ( const TextureSamplerExternal sampler,
dataConsumerId_t  dataId 
)

Annotates a ramses::TextureSamplerExternal as a content consumer. Texture provider and texture consumer can be linked on Ramses Renderer side. Linking textures means that the consumer's sampler will use provider's texture as content.

Sampler for external texture can only be linked to an external buffer on Ramses Renderer side (ramses::RamsesRenderer::createExternalBuffer).

Parameters
[in]samplerwhich shall consume texture content from provider texture.
[in]dataIdid to reference the consumer in this scene
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ createTextureConsumer() [3/3]

status_t ramses::Scene::createTextureConsumer ( const TextureSamplerMS sampler,
dataConsumerId_t  dataId 
)

Annotates a ramses::TextureSamplerMS as a content consumer. Texture provider and texture consumer can be linked on Ramses Renderer side. Linking textures means that the consumer's sampler will use provider's texture as content.

Parameters
[in]samplerwhich shall consume texture content from provider texture.
[in]dataIdid to reference the consumer in this scene
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ createTextureCube()

TextureCube* ramses::Scene::createTextureCube ( ETextureFormat  format,
uint32_t  size,
uint32_t  mipMapCount,
const CubeMipLevelData  mipLevelData[],
bool  generateMipChain = false,
const TextureSwizzle swizzle = {},
resourceCacheFlag_t  cacheFlag = ResourceCacheFlag_DoNotCache,
const char *  name = nullptr 
)

Create a new Cube Texture. It makes a copy of the given data of a certain type as a resource, an immutable data object. All texel values are initially initialized to 0. See ramses::TextureCube for more details. See ramses::CubeMipLevelData for more details on expected texel alignment.

Parameters
[in]formatPixel format of the Cube Texture data.
[in]sizeedge length of one quadratic cube face, belonging to the texture.
[in]mipMapCountNumber of mipmaps contained in mipLevelData array.
[in]mipLevelDataArray of MipLevelData structs defining mipmap levels to use. Amount and sizes of supplied mipmap levels have to conform to GL specification. Order ist lowest level (biggest resolution) to highest level (smallest resolution).
[in]generateMipChainAuto generate mipmap levels. Cannot be used if custom data for lower mipmap levels provided.
[in]swizzleDescribes how RGBA channels of the texture are swizzled,
[in]cacheFlagThe optional flag sent to the renderer. The value describes how the cache implementation should handle the resource.
[in]nameThe name of the Cube Texture.
Returns
A pointer to the created Cube Texture, null on failure. Will fail with any face-data == nullptr and/or size == 0.

◆ createTextureProvider()

status_t ramses::Scene::createTextureProvider ( const Texture2D texture,
dataProviderId_t  dataId 
)

Annotates a Texture2D as a content provider. Texture provider and texture consumer can be linked on Ramses Renderer side. Linking textures means that the consumer's sampler will use provider's texture as content.

Parameters
[in]texturefrom which content shall be provided.
[in]dataIdid to reference the provider in this scene
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-local-datalink/src/main.cpp.

◆ createTextureSampler() [1/6]

TextureSampler* ramses::Scene::createTextureSampler ( ETextureAddressMode  wrapUMode,
ETextureAddressMode  wrapVMode,
ETextureAddressMode  wrapRMode,
ETextureSamplingMethod  minSamplingMethod,
ETextureSamplingMethod  magSamplingMethod,
const Texture3D texture,
const char *  name = nullptr 
)

Creates a texture sampler object.

Parameters
[in]wrapUModetexture wrap mode for u axis.
[in]wrapVModetexture wrap mode for v axis.
[in]wrapRModetexture wrap mode for r axis.
[in]minSamplingMethodtexture min sampling method.
[in]magSamplingMethodtexture mag sampling method. Must be set to either Nearest or Linear.
[in]textureTexture to be used with this sampler object.
[in]nameOptional name of the object.
Returns
Pointer to the created TextureSampler, null on failure.

◆ createTextureSampler() [2/6]

TextureSampler* ramses::Scene::createTextureSampler ( ETextureAddressMode  wrapUMode,
ETextureAddressMode  wrapVMode,
ETextureSamplingMethod  minSamplingMethod,
ETextureSamplingMethod  magSamplingMethod,
const RenderBuffer renderBuffer,
uint32_t  anisotropyLevel = 1,
const char *  name = nullptr 
)

Creates a texture sampler object.

Parameters
[in]wrapUModetexture wrap mode for u axis.
[in]wrapVModetexture wrap mode for v axis.
[in]minSamplingMethodtexture min sampling method.
[in]magSamplingMethodtexture mag sampling method. Must be set to either Nearest or Linear.
[in]renderBufferRenderBuffer to be used with this sampler object. The render buffer must have access mode of read/write and 0 samples (ramses::RenderBuffer::getSampleCount).
[in]anisotropyLevelTexture sampling anisotropy level. 1: isotropic sampling, >1: anisotropic sampling usual values: 1, 2, 4, 8, 16 (dependent on graphics platform)
[in]nameOptional name of the object.
Returns
Pointer to the created TextureSampler, null on failure.

◆ createTextureSampler() [3/6]

TextureSampler* ramses::Scene::createTextureSampler ( ETextureAddressMode  wrapUMode,
ETextureAddressMode  wrapVMode,
ETextureSamplingMethod  minSamplingMethod,
ETextureSamplingMethod  magSamplingMethod,
const StreamTexture streamTexture,
const char *  name = nullptr 
)

Creates a texture sampler object.

Parameters
[in]wrapUModetexture wrap mode for u axis.
[in]wrapVModetexture wrap mode for v axis.
[in]minSamplingMethodtexture min sampling method.
[in]magSamplingMethodtexture mag sampling method. Must be set to either Nearest or Linear.
[in]streamTextureStreamTexture to be used with this sampler object.
[in]nameOptional name of the object.
Returns
Pointer to the created TextureSampler, null on failure.

◆ createTextureSampler() [4/6]

TextureSampler* ramses::Scene::createTextureSampler ( ETextureAddressMode  wrapUMode,
ETextureAddressMode  wrapVMode,
ETextureSamplingMethod  minSamplingMethod,
ETextureSamplingMethod  magSamplingMethod,
const Texture2D texture,
uint32_t  anisotropyLevel = 1,
const char *  name = nullptr 
)

Creates a texture sampler object.

Parameters
[in]wrapUModetexture wrap mode for u axis.
[in]wrapVModetexture wrap mode for v axis.
[in]minSamplingMethodtexture min sampling method.
[in]magSamplingMethodtexture mag sampling method. Must be set to either Nearest or Linear.
[in]textureTexture to be used with this sampler object.
[in]anisotropyLevelTexture sampling anisotropy level. 1: isotropic sampling, >1: anisotropic sampling usual values: 1, 2, 4, 8, 16 (depending on graphics platform)
[in]nameOptional name of the object.
Returns
Pointer to the created TextureSampler, null on failure.
Examples
ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-dma-offscreenbuffer/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, and ramses-example-renderonce/src/main.cpp.

◆ createTextureSampler() [5/6]

TextureSampler* ramses::Scene::createTextureSampler ( ETextureAddressMode  wrapUMode,
ETextureAddressMode  wrapVMode,
ETextureSamplingMethod  minSamplingMethod,
ETextureSamplingMethod  magSamplingMethod,
const Texture2DBuffer texture2DBuffer,
uint32_t  anisotropyLevel = 1,
const char *  name = nullptr 
)

Creates a texture sampler object for mutable texture.

Parameters
[in]wrapUModetexture wrap mode for u axis.
[in]wrapVModetexture wrap mode for v axis.
[in]minSamplingMethodtexture min sampling method.
[in]magSamplingMethodtexture mag sampling method. Must be set to either Nearest or Linear.
[in]texture2DBufferTexture2DBuffer to be used with this sampler object.
[in]anisotropyLevelTexture sampling anisotropy level. 1: isotropic sampling, >1: anisotropic sampling usual values: 1, 2, 4, 8, 16 (dependent on graphics platform)
[in]nameOptional name of the object.
Returns
Pointer to the created TextureSampler, null on failure.

◆ createTextureSampler() [6/6]

TextureSampler* ramses::Scene::createTextureSampler ( ETextureAddressMode  wrapUMode,
ETextureAddressMode  wrapVMode,
ETextureSamplingMethod  minSamplingMethod,
ETextureSamplingMethod  magSamplingMethod,
const TextureCube texture,
uint32_t  anisotropyLevel = 1,
const char *  name = nullptr 
)

Creates a texture sampler object.

Parameters
[in]wrapUModetexture wrap mode for u axis.
[in]wrapVModetexture wrap mode for v axis.
[in]minSamplingMethodtexture min sampling method.
[in]magSamplingMethodtexture mag sampling method. Must be set to either Nearest or Linear.
[in]textureTexture to be used with this sampler object.
[in]anisotropyLevelTexture sampling anisotropy level. 1: isotropic sampling, >1: anisotropic sampling usual values: 1, 2, 4, 8, 16 (dependent on graphics platform)
[in]nameOptional name of the object.
Returns
Pointer to the created TextureSampler, null on failure.

◆ createTextureSamplerExternal()

TextureSamplerExternal* ramses::Scene::createTextureSamplerExternal ( ETextureSamplingMethod  minSamplingMethod,
ETextureSamplingMethod  magSamplingMethod,
const char *  name = nullptr 
)

Creates a texture sampler object that can sample from external textures.

Provides support for sampling from samplers represented by variables of type "samplerExternalOES" in GLSL shaders, according to OpenGL extension "OES_EGL_image_external". According to the spec, external texture samplers must have "clamp to edge" for the wrap mode, and are not allowed to have mip maps so minification filtering must be set to either linear or nearest.

Since it is not possible to directly provide content to external textures similar to conventional 2D textures, external textures can get their content only through the platform specific mechanisms. This can be done by creating a texture consumer from the sampler object and linking it to an external buffer created on the renderer.

Note: external texture sampler can only be used with external textures, i.e., it is not possible to use the same sampler variable in the shader to sample from conventional 2D textures as sort of fallback textures for example.

Parameters
[in]minSamplingMethodtexture min sampling method. Must be set to either Nearest or Linear.
[in]magSamplingMethodtexture mag sampling method. Must be set to either Nearest or Linear.
[in]nameOptional name of the object.
Returns
Pointer to the created TextureSampler, null on failure.

◆ createTextureSamplerMS()

TextureSamplerMS* ramses::Scene::createTextureSamplerMS ( const RenderBuffer renderBuffer,
const char *  name 
)

Creates a multisampled texture sampler object.

Parameters
[in]renderBufferRenderBuffer to be used with this sampler object. The render buffer must be multisampled and have access mode of read/write.
[in]nameOptional name of the object.
Returns
Pointer to the created ramses::TextureSamplerMS, null on failure.
Examples
ramses-example-local-offscreenbuffer/src/main.cpp.

◆ createTransformationDataConsumer()

status_t ramses::Scene::createTransformationDataConsumer ( const Node node,
dataConsumerId_t  dataId 
)

Annotates a Node as a transformation data consumer. Data provider and data consumer can be linked on Ramses Renderer side. Linking data means that the consumer's data property will be overridden by provider's data property.

Parameters
[in]nodewhich shall consume data from another node.
[in]dataIdid to reference the consumer node in this scene
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-local-datalink/src/main.cpp.

◆ createTransformationDataProvider()

status_t ramses::Scene::createTransformationDataProvider ( const Node node,
dataProviderId_t  dataId 
)

Annotates a Node as a transformation data provider. Data provider and data consumer can be linked on Ramses Renderer side. Linking data means that the consumer's data property will be overridden by provider's data property.

Parameters
[in]nodefrom which transformation data shall be provided.
[in]dataIdid to reference the provider node in this scene
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-local-datalink/src/main.cpp.

◆ destroy()

status_t ramses::Scene::destroy ( SceneObject object)

◆ findObjectById() [1/2]

SceneObject* ramses::Scene::findObjectById ( sceneObjectId_t  id)

Get an object from the scene by id.

Parameters
[in]idThe id of the object to get.
Returns
Pointer to the object if found, nullptr otherwise.

◆ findObjectById() [2/2]

const SceneObject* ramses::Scene::findObjectById ( sceneObjectId_t  id) const

Get an object from the scene by id.

Parameters
[in]idThe id of the object to get.
Returns
Pointer to the object if found, nullptr otherwise.

◆ findObjectByName() [1/2]

RamsesObject* ramses::Scene::findObjectByName ( const char *  name)

Get an object from the scene by name.

Parameters
[in]nameThe name of the object to get.
Returns
Pointer to the object if found, nullptr otherwise.

◆ findObjectByName() [2/2]

const RamsesObject* ramses::Scene::findObjectByName ( const char *  name) const

Get an object from the scene by name.

Parameters
[in]nameThe name of the object to get.
Returns
Pointer to the object if found, nullptr otherwise.
Examples
ramses-example-basic-file-loading/src/main.cpp, ramses-example-local-dma-offscreenbuffer/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, ramses-example-local-scene-referencing/src/main.cpp, and ramses-example-local-viewport-link/src/main.cpp.

◆ flush()

status_t ramses::Scene::flush ( sceneVersionTag_t  sceneVersionTag = InvalidSceneVersionTag)

Commits all changes done to the scene since the last flush or since scene creation. This makes a new valid scene state available to all local and remote renderers.

Parameters
[in]sceneVersionTagupdates the version tag of the scene along with the flushed scene updates. If set to a valid value, a subscribed renderer will generate a sceneFlushed() event when the scene update has been applied. Invalid scene version ids are ignored. Defaults to InvalidSceneVersionTag.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, 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, ramses-example-local-viewport-link/src/main.cpp, ramses-example-minimal/src/main.cpp, ramses-example-renderonce/src/main.cpp, ramses-example-text-basic/src/main.cpp, and ramses-example-text-languages/src/main.cpp.

◆ getLastEffectErrorMessages()

std::string ramses::Scene::getLastEffectErrorMessages ( ) const

Get the GLSL error messages that were produced at the creation of the last Effect.

Returns
A string containing the GLSL error messages of the last effect

◆ getRamsesClient()

RamsesClient& ramses::Scene::getRamsesClient ( )

Getter for ramses::RamsesClient this Scene was created from.

Returns
the parent RamsesCLient

◆ getResource() [1/2]

Resource* ramses::Scene::getResource ( resourceId_t  id)

Get a resource which is owned by the scene by id.

Parameters
[in]idThe resource id of the resource to get.
Returns
Pointer to the resource if found, nullptr otherwise.

◆ getResource() [2/2]

const Resource* ramses::Scene::getResource ( resourceId_t  id) const

Get a resource which is owned by the scene by id.

Parameters
[in]idThe resource id of the resource to get.
Returns
Pointer to the resource if found, nullptr otherwise.

◆ getSceneId()

sceneId_t ramses::Scene::getSceneId ( ) const

Returns scene id defined at scene creation time.

Returns
Scene id.

◆ getUniformTimeMs()

int32_t ramses::Scene::getUniformTimeMs ( ) const

Gets the current value used for the semantic uniform ramses::EEffectUniformSemantic::TimeMs Value wraps to 0 every ~24 days, measured from the beginning of synchronized clock epoch.

In order to avoid handling the wrap in the shader code or potential overflow issues the value should be reset using ramses::Scene::resetUniformTimeMs() The value is not reset automatically at startup.

Returns
time in milliseconds, value range is 0 .. std::numeric_limits<int32_t>::max() (~24 days)

◆ isPublished()

bool ramses::Scene::isPublished ( ) const

Returns whether scene is currently published to the ramses system.

Returns
true, if scene is currently published.
false, if scene is currently not published.

◆ linkData()

status_t ramses::Scene::linkData ( SceneReference providerReference,
dataProviderId_t  providerId,
SceneReference consumerReference,
dataConsumerId_t  consumerId 
)

Tell the RamsesRenderer to link a data provider to a data consumer across two scenes.

Data provider and data consumer must be created via client scene API and their data type must match. Linking data means that the consumer's data property will be overridden by provider's data property. A consumer within a scene can be linked to exactly one provider.

A link between provider and consumer is possible, if they are either part of the this scene or one of its scene references.

If the function returns StatusOK, ramses::IClientEventHandler::dataLinked will be emitted after the link is processed by renderer. The link will fail (reported via callback result argument) if either the data provider or data consumer does not exist or their data type does not match.

Scene reference must be known to renderer side before attempting to make a data link. Make sure any involved ramses::SceneReference was reported to be in state Ready or higher (see ramses::IClientEventHandler::sceneReferenceStateChanged).

Should one of the scene references of the data link go to state Available or Unavailable while the data link is active, the link will implicitly be destroyed and needs to be rerequested again.

If successful the operation can be assumed to be effective in the next frame consumer scene is rendered after flushed. If the data consumer is already linked to a provider (data or offscreen buffer), the old link will be discarded, however if the new link fails it is undefined whether previous link was discarded or not.

Parameters
providerReferenceA pointer to a SceneReference created by this scene, or nullptr to use this scene.
providerIdThe id of the data provider within the providerScene or providerReference.
consumerReferenceA pointer to the SceneReference which consumes the data, or nullptr to use this scene.
consumerIdThe id of the data consumer within the consumerScene or consumerReference.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-local-scene-referencing/src/main.cpp.

◆ operator=()

Scene& ramses::Scene::operator= ( const Scene other)
protected

Assignment operator of Scene.

Parameters
[in]otherOther instance of Scene class
Returns
This instance after assignment

◆ publish()

status_t ramses::Scene::publish ( EScenePublicationMode  publicationMode = EScenePublicationMode_LocalAndRemote)

Publishes the scene to the ramses system.

Other ramses system participants will be informed about the existence of the scene and can subscribe to it. The scene content is then sent to all subscribers and following flushes will send scene updates to them.

Parameters
[in]publicationModeA flag to signal if a scene should be only available to local renderer(s) and not published outside of the client. By default, scene is published and everyone in the RAMSES world can subscribe to it
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, 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, ramses-example-local-viewport-link/src/main.cpp, ramses-example-minimal/src/main.cpp, ramses-example-renderonce/src/main.cpp, ramses-example-text-basic/src/main.cpp, and ramses-example-text-languages/src/main.cpp.

◆ resetUniformTimeMs()

status_t ramses::Scene::resetUniformTimeMs ( )

resets the semantic uniform ramses::EEffectUniformSemantic::TimeMs The uniform value will contain the time elapsed since this method was called for the last time. Use this method to avoid possible overflow issues. The reset will be applied to the rendered scene with the next flush.

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

◆ saveToFile()

status_t ramses::Scene::saveToFile ( const char *  fileName,
bool  compress 
) const

Saves all scene contents to a file.

Parameters
[in]fileNameFile name to save the scene to.
[in]compressif set to true, resources might be compressed before saving otherwise, uncompressed data will be saved
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-basic-file-loading/src/main.cpp.

◆ setExpirationTimestamp()

status_t ramses::Scene::setExpirationTimestamp ( uint64_t  ptpExpirationTimestampInMilliseconds)

Expiration timestamp is a point in time till which the scene is considered to be up-to-date.

Logic on renderer side will check the time every frame and in case it detects the scene to be rendered after its expiration timestamp it will generate an event (ramses::IRendererSceneControlEventHandler::sceneExpired).

IMPORTANT: Expiration timestamp value is bound to current state of scene (once it is flushed) and for all subsequent flushes until changed again or disabled. Once expiration timestamp is set to non-zero all subscribed renderers will periodically check it from that point on. User is responsible for calling this method to keep the expiration up-to-date during the lifecycle of the scene.

Setting the expiration timestamp to non-zero value enables the monitoring (ramses::IRendererSceneControlEventHandler::sceneExpirationMonitoringEnabled), to disable the expiration monitoring set expiration timestamp to 0 followed by a flush. By default the expiration checking is disabled. If an expired scene recovers while monitoring is disabled, there will be no event of recovery after monitoring re-enabled. If scene is expired at the moment monitoring is enabled, there will be event of expiration (after ramses::IRendererSceneControlEventHandler::sceneExpirationMonitoringEnabled).

Parameters
[in]ptpExpirationTimestampInMillisecondsExpiration timestamp in milliseconds from synchronized clock. To avoid issues, keep this up-to-date reasonably enough in future.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ unlinkData()

status_t ramses::Scene::unlinkData ( SceneReference consumerReference,
dataConsumerId_t  consumerId 
)

Removes an existing link between two scenes (see ramses::Scene::linkData).

If the function returns StatusOK, ramses::IClientEventHandler::dataUnlinked will be emitted after it is processed by renderer. If successful the operation can be assumed to be effective in the next frame consumer scene is rendered after flushed.

Parameters
consumerReferenceThe pointer to the SceneReference which consumes the data, or nullptr to use this scene.
consumerIdThe id of the data consumer within the consumerReference.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ unpublish()

status_t ramses::Scene::unpublish ( )

◆ updateTextureProvider()

status_t ramses::Scene::updateTextureProvider ( const Texture2D texture,
dataProviderId_t  dataId 
)

Sets a new texture to an existing provider. This allows the provider to change the provided content which is then automatically applied to all linked consumers on the renderer side without the need to recreate or relink any provider/consumer.

Parameters
[in]texturefrom which content shall be provided.
[in]dataIdid to reference the provider in this scene
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

Friends And Related Function Documentation

◆ RamsesClientImpl

friend class RamsesClientImpl
friend

RamsesClient is the factory for creating Scene instances.

Member Data Documentation

◆ impl

SceneImpl& ramses::Scene::impl

Stores internal data for implementation specifics of Scene.


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