diff --git a/CHANGELOG.md b/CHANGELOG.md
index d48377e8d..b51218229 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,51 +1,41 @@
# Ramses Changelog
-28.0.0-rc5
+28.0.0
-------------------
-### Fixed
-- Fixed renderer logging configuration caused by 2 logger instances
-
-28.0.0-rc4
--------------------
-### Changed
-- `ArrayResource` and `ArrayBuffer` use `size_t` instead of `uint32_t` for number of elements for consistency with other API and STL
-
-### Fixed
-- Fixed abort() with trace logs enabled and API calls containing strings with format string characters ("{}")
-
-28.0.0-rc3
--------------------
-### Added
-- added `ramses-viewer` tool. It replaces `ramses-scene-viewer` and `ramses-logic-viewer`
-- added `RenderBufferBinding` which can be used in logic to modify `RenderBuffer` properties before it is allocated on renderer
-- added `RamsesFrameworkConfig::setLoggingInstanceName` to set a global instance name used as prefix in all Ramses logs
-
-### Changed
-- Headless shared lib always gets built
-- removed automatic validation when saving scene to a file (also removed the parameter from SaveFileConfig)
-- Modernized `MipLevelData` and `CubeMipLevelData`. Data are no longer stored with raw pointers
- - Updated `RamsesUtils::GenerateMipMapsTexture2D` and `RamsesUtils::GenerateMipMapsTextureCube` to return a pointer of vector of the respective mip level data
- - Updated `RamsesUtils::DeleteGeneratedMipMaps` for deleting the vector pointers
-- `Texture2DBuffer::updateData` now takes std::bytes
-- `Scene::saveToFile` implicitly updates all logic engine instances and flushes the scene before saving, the method is therefore no longer const
-
-### Removed
-- removed `ramses-scene-viewer` - use `ramses-viewer` instead
-- removed `ramses-logic-viewer` - use `ramses-viewer` instead
-- removed `ramses-logic-viewer-headless` - use `ramses-viewer-headless` instead
-- removed cmake option `ramses-sdk_BUILD_HEADLESS_SHARED_LIB` for enabling headless shared lib since it always gets built now
-
-28.0.0-rc2
--------------------
-### Added
+### Added
+- Integrated Ramses logic
+ - If you want to exclude logic, disable it over CMake (ramses-sdk_ENABLE_LOGIC=OFF)
+ - The version which was merged is 1.4.2. You can find the changelog/docs of Logic [here](https://ramses-logic.readthedocs.io/en/v1.4.2/)
+ - Moved all types from `rlogic` namespace to `ramses` namespace
+- Added support for feature levels. RamsesFramework has to be constructed with a feature level specified
+ (using RamsesFrameworkConfig), see EFeatureLevel for more information.
+ - Added `RamsesFramework::getFeatureLevel` to easily query EFeatureLevel
+- Unified math types usage across API to use GLM aliases: vec2/3/4f, vec2/3/4i, matrix22/33/44f, quat
+- Added support for rotation by quaternion: `Node::setRotation(const quat&)`, `Node::getRotationType`
+- Added `DisplayConfig::setDeviceType()` and `DisplayConfig::getDeviceType()` to select device type for display creation
+- Added `DisplayConfig::setWindowType()` and `DisplayConfig::getWindowType()` to select window type for display creation
+- Added `ramses-viewer`, `ramses-viewer-headless` (replaces `ramses-scene-viewer`, `ramses-logic-viewer`, `ramses-logic-viewer-headless`)
+ - Default GUI mode changed to `overlay` (`--no-offscreen` in former ramses-logic-viewer)
+ - Added support for multiple logic engines per scene. Legacy lua configuration files need to be changed like this:
+ - replace `rlogic.screenshot` by `R.screenshot`
+ - replace `rlogic.views` by `R.views`
+ - replace `rlogic.` by `R.logic().` or `R.logic[].`
+ - added font settings
+ - renamed some command line options:
+ - `--no-validation`: removed short option (-nv)
+ - `--no-skub`: removed short option (-ns)
+ - Renamed `-x,--screenshot-file` to `-x,--screenshot`
+ - Scene file can be applied as positional argument
+- Added other data types used in API to EDataType enum: EDataType::Int32, EDataType::Vector2/3/4I, EDataType::Matrix22/33/44F
+- Added `RenderBufferBinding` which can be used in logic to modify `RenderBuffer` properties before it is allocated on renderer
+- Added `RamsesFrameworkConfig::setLoggingInstanceName` to set a global instance name used as prefix in all Ramses logs
- Added periodic statistics logs with more details and `EStatisticsLogMode` to select the log mode
- If detailed statistics is selected, the slowest executed nodes are shown
-- Added support for creating renderer with iOS window
+- Added experimental support for creating renderer with iOS window
- Added native support for bool uniforms, no need to use int32_t anymore to set them
- - existing application code using `Appearance::setInputValue` with `int32_t` type to set boolean shader uniforms must change to use `bool` type now!
-- Supported bool for the data container `ramses::DataObject`
-- Added `RamsesFramework::getFeatureLevel()` to easily query EFeatureLevel
+ - Existing application code using `Appearance::setInputValue` with `int32_t` type to set boolean shader uniforms must change to use `bool` type now!
+- Added support for `bool` type in data container `ramses::DataObject`
- Added `RamsesClient::getRamsesFramework()` to be able to get reference to `RamsesFramework` from `RamsesClient`
- this can be used for example to get feature level just by having a `Scene` instance: myScene.getRamsesClient().getRamsesFramework().getFeatureLevel()
- Added `SceneObject::getScene()` to get reference to owning `Scene` from any object created from that Scene
@@ -54,17 +44,20 @@
- Added a non-const version of `Property::getIncomingLink()` and `Property::getOutgoingLink()`
- Added support for 16bit and 32bit depth render buffers: `ERenderBufferFormat::Depth16`, `ERenderBufferFormat::Depth32`
- Added common cast operators for ramses and logic objects: `T* RamsesObject::as()` `T ramses::object_cast(RamsesObject*)`
+- Added ramses-sdk_TEXT_SUPPORT, a CMake option to disable text support.
+ - Disabled by default on iOS and MacOS builds.
+ - Other platforms remain unaffected by the option.
+- Exposed stream buffer API (previously available only via DCSM)
+ - Added `RamsesRenderer::createStreamBuffer` and `RamsesRenderer::destroyStreamBuffer`.
+ - Added `RendererSceneControl::linkStreamBuffer` and corresponding callback `IRendererSceneControlEventHandler::streamBufferLinked`.
+- Added options to RamsesFrameworkConfig API that previously required command line parsing
+- Added [[nodiscard]] flag for const getters.
-### Changed
+### Changed
-- Modernized mipLevelData from C-style array to vector for `Scene::createTexture2D()`, `Scene::createTexture3D()` and `Scene::createTextureCube()`
-- Scene::findObject now also searches for logic objects in all existing logic engines
-- Switched from fmt 7.0.1 to 10.1.1
-- Switched from google-benchmark 1.5.2 to 1.8.3
-- Switched from google-flatbuffers 1.12.0 to 23.5.9
-- LogicEngine is now part of Scene and can only be created using Scene::createLogicEngine
+- LogicEngine is now part of Scene and can only be created using `Scene::createLogicEngine`
- LogicEngine is now a SceneObject of type ERamsesObjectType::LogicEngine and its lifecycle is managed by Scene as for any other SceneObject. LogicEngine is no longer a move-able type.
- - removed the ramses::Scene argument from all loading functions in LogicEngine: loadFromFile, loadFromFileDescriptor, loadFromBuffer (is now implicit)
+ - Removed the ramses::Scene argument from all loading functions in LogicEngine: loadFromFile, loadFromFileDescriptor, loadFromBuffer (is now implicit)
- LogicObject now derives from SceneObject and therefore RamsesObject
- `LogicObject::getId` is renamed to `LogicObject::getLogicObjectId`
- `LogicObject::setName/getName` are removed, methods with same name and functionality (but different return type!) are in base class RamsesObject
@@ -72,14 +65,24 @@
- RamsesObject.h and RamsesObjectTypes.h moved from `client` include folder to `framework`, update include paths accordingly
- `RamsesObject::getName` returns `std::string_view` instead of `const char*`
- Reworked API error handling for all public Ramses classes:
- - removed `status_t`, `StatusOK`, `StatusObject::getStatusMessage`, `LogicEngine::getErrors`, `ErrorData` and the whole `StatusObject` class
- - all API methods that can fail (at API call time) return `bool` (true for success)
- - errors are now collected centrally in `RamsesFramework`
+ - Removed `status_t`, `StatusOK`, `StatusObject::getStatusMessage`, `LogicEngine::getErrors`, `ErrorData` and the whole `StatusObject` class
+ - All API methods that can fail (at API call time) return `bool` (true for success)
+ - Errors are now collected centrally in `RamsesFramework`
- `RamsesFramework::getLastError` can be used to get the last error that occurred (as optional), calling it will clear the error
- - configs and other not managed objects (`RamsesFrameworkConfig`, `RendererConfig`, `DisplayConfig`,`SceneConfig`, `RenderTargetDescription`, `EffectDescription`, `EffectInput`)
+ - Configs and other not managed objects (`RamsesFrameworkConfig`, `RendererConfig`, `DisplayConfig`,`SceneConfig`, `RenderTargetDescription`, `EffectDescription`, `EffectInput`)
no longer inherit from `StatusObject`. Their methods also return `bool` but error messages are only logged (not tracked with `getLastError`).
- `RenderTargetDescription::addRenderBuffer` has optional argument to get human readable description of error if failed
- Export whole API classes in shared libs, instead of exporting only public functions
+- Headless shared lib always gets built
+- `Scene::saveToFile` implicitly updates all logic engine instances and flushes the scene before saving, the method is therefore no longer const
+- `Scene::findObject` now also searches for logic objects in all existing logic engines
+- Updated fmt from 7.0.1 to 10.1.1
+- Updated google-benchmark from 1.5.2 to 1.8.3
+- Updated google-flatbuffers from 1.12.0 to 23.5.9
+- Upgraded the minimum version of the C++ standard in Ramses to 17.
+ - All modern compilers support C++ 17 meanwhile.
+ - Some of the dependencies of Ramses have also switched to C++17.
+ - Some tools and linters work better and detect more issues with a higher version of the standard.
- Changed default publishing mode of scenes from EScenePublicationMode::LocalAndRemote to EScenePublicationMode::LocalOnly
- local-only scenes cannot be sent over network, as the name suggests
- local-only scenes must be periodically flushed in order to get to Ready/Rendered state if using RendererSceneControl
@@ -95,47 +98,58 @@
- Renderer API headers are found under "ramses/renderer"
- Added a script scripts/migrate_to_28_0_0.py that can migrate all includes in a codebase to new format
- Forbade to use the default constructors of `UniformInput` and `AttributeInput` to create objects but objects can be
- - created via copy and move constructors, or
- - obtained via `getUniformInput`, `getAttributeInput`, `findUniformInput`, and `findAttributeInput`
+ - Created via copy and move constructors, or
+ - Obtained via `getUniformInput`, `getAttributeInput`, `findUniformInput`, and `findAttributeInput`
- Changed to return `optional` or `optional` objects in `getUniformInput`, `getAttributeInput`, `findUniformInput`, and `findAttributeInput`
- Removed `EffectInput::isValid` because `UniformInput` and `AttributeInput` objects are always valid now
- Changed `EffectInput::getDataType` to return `EDataType` instead of `optional`
- DisplayConfig::validate produces warnings or errors if suboptimal or wrong settings are set, e.g., incompatible window and device types are set
-- Remove the 4096 upper limit of offscreen buffer size in RamsesRenderer. The buffer size is limited by the OpenGL driver.
- Changed LogHandlerFunc to use `std::string_view` instead of `const std::string&`
- ramses-logic logs are output to DLT (context 'RCLI')
-- Changed clear flags parameters from `uint32_t` to `ramses::ClearFlags` (`ramses::Flags`)
- Remove cmake option `ramses-sdk_BUILD_IVI_TEST_APPS`
- ivi-gears and ivi-simple-dmabuf-egl are now controlled with option for building tools
- Remove check for cmake variable `ramses-sdk_DISABLE_WAYLAND_IVI_EXTENSION`. The extensions are built if the required
dependencies are available
-- Changed key modifier flags parameters from `uint32_t`to `ramses::KeyModifiers` (`ramses::Flags`)
- Moved `ramses-client-api/TextureEnums.h` to `ramses/framework/TextureEnums.h`
- Moved `ramses-client-api/ERotationType.h` to `ramses/framework/ERotationType.h`
- Moved `ramses-client-api/EVisibilityMode.h` to `ramses/framework/EVisibilityMode.h`
- Moved `ramses-client-api/EScenePublicationMode.h` to `ramses/framework/EScenePublicationMode.h`
+- Replaced `Scene::findObjectByName(..)`/`Scene::findObjectById(..)` by `T* Scene::findObject(..)`
+- Replaced `LogicEngine::findByName(..)`/`LogicEngine::findLogicObjectById(..)` by `T* LogicEngine::findObject(..)`
+- Added SaveFileConfig parameter to `ramses::Scene::saveToFile()`, removed compression flag
+ - Compression flag is part of SaveFileConfig and is disabled by default
+- Changed interfaces to load/create scenes: Added sceneId and verification flag to `ramses::SceneConfig`
+- Changed scene validation interface to report a list of messages (see `ramses::RamsesObject::validate(ValidationReport&)`)
+- Replaced `const std::vector& LogicEngine::validate()` by common Ramses validation (`ramses::RamsesObject::validate(ValidationReport&)`)
+- The scene validation will not return `StatusOK` if effects have shader warnings, and these warnings will appear in the validation report with a severity of `EValidationSeverity::Warning`
+- Remove the 4096 upper limit of offscreen buffer size in RamsesRenderer. The buffer size is limited by the OpenGL driver.
+- Draw mode is checked against geometry shader input type (Appearance::setDrawMode) also when effect was loaded from file
+ (previously it was checked only when effect created in same session without loading).
+- Modernized `MipLevelData` and `CubeMipLevelData`. Data are no longer stored with raw pointers
+ - Updated `RamsesUtils::GenerateMipMapsTexture2D` and `RamsesUtils::GenerateMipMapsTextureCube` to return a pointer of vector of the respective mip level data
+ - Updated `RamsesUtils::DeleteGeneratedMipMaps` for deleting the vector pointers
+- `Texture2DBuffer::updateData` now takes std::bytes
+- Modernized mipLevelData from C-style array to vector for `Scene::createTexture2D()`, `Scene::createTexture3D()` and `Scene::createTextureCube()`
+- Changed clear flags parameters from `uint32_t` to `ramses::ClearFlags` (`ramses::Flags`)
+- Changed key modifier flags parameters from `uint32_t` to `ramses::KeyModifiers` (`ramses::Flags`)
- MeshNode instance count can be zero (nothing drawn) to match OpenGL behavior
- OpenGL drawcalls are always using glDrawElementsInstanced even for instance count 1
- `ETextureAddressMode` enum is now explicitly typed to uint8_t
- `ETextureSamplingMethod` enum is now explicitly typed to uint8_t
- `ETextureFormat` enum is now explicitly typed to uint8_t
-- The scene validation will not return `StatusOK` if effects have shader warnings, and these warnings will appear in the validation report with a severity of `EValidationSeverity::Warning`
- `DisplayConfig::setX11WindowHandle`: changed parameter from `unsigned long` to `X11WindowHandle`
- `IFontInstance::getAllSupportedCharacters()`: changed return type set from `unsigned long` to `char32_t`
-- Replaced `Scene::findObjectByName(..)`/`Scene::findObjectById(..)` by `T* Scene::findObject(..)`
-- Replaced `LogicEngine::findByName(..)`/`LogicEngine::findLogicObjectById(..)` by `T* LogicEngine::findObject(..)`
-- Changed scene validation interface to report a list of messages (see `ramses::RamsesObject::validate(ValidationReport&)`)
-- Replaced `const std::vector& LogicEngine::validate()` by common Ramses validation (`ramses::RamsesObject::validate(ValidationReport&)`)
-- Added SaveFileConfig parameter to `ramses::Scene::saveToFile()`, removed compression flag
- - compression flag is part of SaveFileConfig and is disabled by default
- - by default `saveToFile()` will fail, if the scene has validation errors (warnings will be ignored)
-- Changed interfaces to load/create scenes: Added sceneId and verification flag to `ramses::SceneConfig`
-- ramses-scene-viewer:
- - changed default gui mode to "overlay" (no offscreen buffer)
-- ramses-logic-viewer:
- - disabled offscreen rendering by default, cli option is changed from `--no-offscreen` to `--offscreen`
+- Renamed standalone renderer executable to `ramses-renderer-standalone` and renamed some command line options:
+ - Renamed -nd,--numDisplays to --displays
+ - Renamed -sm,--sceneMappings to -m,--scene-mapping
+ - Renamed -nomap,--disableAutoMapping to --no-auto-show
+ - -skub,--skub: removed short option(-skub)
+- Ramses shared lib with renderer is always called ramses-shared-lib (without platform dependant postfix)
+ - Contents are controlled using cmake variables ramses-sdk_ENABLE_WINDOW_TYPE_*
+- Ramses client only shared lib is renamed to ramses-shared-lib-headless
+- Ramses examples, demos, tests and tools are enabled by default only if ramses is a top level project, otherwise
+ they must be explicitly enabled using respective cmake options
- Renamed ramses::EClearFlags to ramses::EClearFlag
-- Renamed standalone renderer executable to `ramses-renderer-standalone`
- Renamed `ERamsesObjectType::ArrayBufferObject` to `ERamsesObjectType::ArrayBuffer` to match the class name
- Renamed the classes for bindings to Ramses objects
- Renamed `RamsesAppearanceBinding` to `AppearanceBinding`
@@ -145,101 +159,14 @@
- Renamed `RamsesRenderGroupBinding` to `RenderGroupBinding` and `RamsesRenderGroupBindingElements` to `RenderGroupBindingElements`
- Renamed `RamsesMeshNodeBinding` to `MeshNodeBinding`
- Renamed `GeometryBinding` to `Geometry`
-
-### Removed
-
-- Removed `IRendererResourceCache`, `DefaultRendererResourceCache` and `RendererConfig::setRendererResourceCache()`
-- Removed `resourceCacheFlag_t` type and updated relavant classes and implementations
- - Removed `ResourceCacheFlag_DoNotCache`
- - Removed resourceCacheFlag_t optional argument from all Scene::create*Resource
- - Removed `resourceCacheFlagTag`
-- Removed default rotation convention from Node::setRotation(vec3f,rotationType)
-- Removed support for 32-bit architectures.
-- Removed `LogicEngine::setStatisticsLogLevel`: periodic log level is always set to Info
-- Removed obsolete `RamsesLogicVersion`, use `RamsesVersion` instead
-- Removed `SceneObject::getSceneId()`, use `SceneObject::getScene().getSceneId()` instead
-- Removed `DisplayConfig::keepEffectsUploaded()` and `--delete-effects` cli option. Effects are always kept uploaded now.
-- Removed `DisplayConfig::setWindowBorderless()` and `--borderless` cli option.
-- Removed ERamsesObjectType::NUMBER_OF_TYPES
-- Removed ETextureFormat::Invalid
-- Removed ramses::AllFeatureLevels array
-- Removed ramses-logic logging API:
- - `Logger::SetVerbosityLimit()`: Use RamsesFrameworkConfig to set loglevel for context 'RCLI' (Info by default)
- - `Logger::SetLogHandler()`: Use RamsesFramework::SetLogHandler()
- - `Logger::SetDefaultLogging()`: Use RamsesFrameworkConfig::setLogLevelConsole(ELogLevel::Off) to disable console output
-- Removed cmake option `ramses-sdk_BUILD_DAEMON`. Now `ramses-deamon` is controlled by cmake option for tools `ramses-sdk_BUILD_TOOLS`
-- Removed `ERenderBufferType` from all API (removed RenderBuffer::getBufferType, changed Scene::createRenderBuffer)
-- Removed `ramses::RamsesUtils::TryConvert`. Use `ramses::object_cast` instead.
-- Removed deprecated method overload `LogicEngine::createLuaInterface` without LuaConfig parameter in favor of providing an empty `LuaConfig` as the default argument.
- Now modules declaration will always be verified (also when not explicitly providing `LuaConfig`).
-- Removed `LogicEngine::saveToFile()`, `LogicEngine::load*` and `LogicEngine::GetFeatureLevelFrom*` methods. Logic is stored in the ramses scene.
-- Removed logic object ID and related API: `LogicObject::getLogicObjectId`, `LogicEngine::findObjectById`
- - use sceneObjectId_t instead as a unique numerical Id for objects
-- Removed `logicfile` command line parameter from ramses-logic-viewer
-
-### Fixed
-
-- RamsesMeshNodeBinding now fails update if it receives invalid value (e.g. negative index count)
-- Fixed RamsesNodeBinding visibility property inconsistency if saved with Ramses node 3-state visibility as 'Off'
- but properties 'enable'=false and 'visible'=true
-- Added checks to prevent crash when logging due to Fmt issue (triggered by some string_views on Ubuntu 20)
-
-28.0.0-rc1
--------------------
-### Added
-
-- Added Ramses logic to the Ramses repository
- - If you want to exclude logic, disable it over CMake (ramses-sdk_ENABLE_LOGIC=OFF)
- - The version which was merged is 1.4.2. You can find the changelog/docs of Logic [here](https://ramses-logic.readthedocs.io/en/v1.4.2/)
- - Moved all types from rlogic namespace to ramses namespace
-- Added support for feature levels, RamsesFramework can now be constructed with a feature level specified
- (using RamsesFrameworkConfig), see EFeatureLevel for more information.
-- Added ramses-sdk_TEXT_SUPPORT, a CMake option to disable text support.
- - Disabled by default on iOS and MacOS builds.
- - Other platforms remain unaffected by the option.
-- Added [[nodiscard]] flag for const getters.
-- Added createStreamBuffer and destroyStreamBuffer to RamsesRenderer.
-- Added linkStreamBuffer to RendererSceneControl, and streamBufferLinked to IRendererSceneControlEventHandler.
-- Added glm math type aliases: vec2/3/4f, vec2/3/4i, matrix22/33/44f, quat
-- Added options to RamsesFrameworkConfig API that previously required command line parsing
-- Added rotation by quaternion: ramses::Node::setRotation(const quat&)
-- Added Node::getRotationType()
-- Added DisplayConfig::setDeviceType() and DisplayConfig::getDeviceType() to select device type for display creation
-- Added DisplayConfig::setWindowType() and DisplayConfig::getWindowType() to select window type for display creation
-
-### Changed
-
-- RamsesFrameworkConfig constructor needs a mandatory argument to specify feature level (see EFeatureLevel for more information)
-- Replaced uint32_t with size_t throughout the API where applicable: `Appearance`, `Effect`, `EffectDescription`, `Node`, `RamsesUtils`, `Scene`, `Texture2DBuffer`, `UniformInput`, `IRendererSceneControlEventHandler::objectsPicked()`.
-- Ramses shared lib with renderer is always called ramses-shared-lib (without platform dependant postfix)
- - Contents are controlled using cmake variables ramses-sdk_ENABLE_WINDOW_TYPE_*
-- Ramses client only shared lib is renamed to ramses-shared-lib-headless
-- Ramses examples, demos, tests and tools are enabled by default only if ramses is a top level project, otherwise
- they must be explicitly enabled using respective cmake options
+- Replaced uint32_t with size_t in all the API for parameters describing amount or number of elements (for better match with STL containers):
+ - `Appearance`, `Effect`, `EffectDescription`, `Node`, `RamsesUtils`, `Scene`, `Texture2DBuffer`, `UniformInput`,
+ `ArrayResource`, `ArrayBuffer`, `IRendererSceneControlEventHandler::objectsPicked()`.
- Changed enums to enum classes.
- Renamed enum values for `ramses::ERendererEventResult`: OK -> Ok, FAIL -> Failed, INDIRECT -> Indirect
- Replaced all enum to string methods by: `const char* ramses::toString(T)`
-- Upgraded the minimum version of the C++ standard in Ramses to 17.
- - All modern compilers support C++ 17 meanwhile.
- - Some of the dependencies of Ramses have also switched to C++17.
- - Some tools and linters work better and detect more issues with a higher version of the standard.
- - Draw mode is checked against geometry shader input type (Appearance::setDrawMode) also when effect was loaded from file
- (previously it was checked only when effect created in same session without loading).
-- Modified ramses-stream-viewer command line options:
- - renamed -fps,--framesPerSecond to --fps
- Stream buffers can be linked even if content from wayland surface is not available (yet).
- Stream buffers do not get unlinked from texture consumers if content from wayland surface becomes unavailable.
-- ramses-scene-viewer: renamed command line options:
- - -nv,--no-validation: removed short option (-nv)
- - -ns,--no-skub: removed short option (-ns)
- - renamed -vd,--validation-output-directory to --output
- - renamed -x,--screenshot-file to -x,--screenshot
- - scene file can be applied as positional argument
-- ramses standalone renderer: renamed command line options:
- - renamed -nd,--numDisplays to --displays
- - renamed -sm,--sceneMappings to -m,--scene-mapping
- - renamed -nomap,--disableAutoMapping to --no-auto-show
- - -skub,--skub: removed short option(-skub)
- Functions that were kept static for API/ABI backcompatibility became proper member methods:
- DisplayConfig::setAsyncEffectUploadEnabled, DisplayConfig::setDepthStencilBufferType
- Effect::hasGeometryShader, Effect::getGeometryShaderInputType
@@ -270,16 +197,14 @@
- ERamsesObjectType_DataBufferObject renamed to ERamsesObjectType_ArrayBufferObject to match the class ArrayBuffer name
- Removed EEffectInputDataType used in UniformInput and AttributeInput, EDataType is used instead
- Uniform/AttributeInput::getDataType now returns std::optional for case when the input is not valid (not or wrongly initialized)
-- Added other data types used in API to EDataType enum: EDataType::Int32, EDataType::Vector2/3/4I, EDataType::Matrix22/33/44F
- Scene::createArrayResource must be used with concrete data type instead of void ptr and data type enum
- - example how to port old code: float twoTriangles[6]={..}; myScene.createArrayResource(EDataType::Vector3F, 2, twoTriangles);
+ - Example how to port old code: float twoTriangles[6]={..}; myScene.createArrayResource(EDataType::Vector3F, 2, twoTriangles);
to new code: vec3f twoTriangles[2]={..}; myScene.createArrayResource(2, twoTriangles);
- - make sure to use the right math type to determine the ArrayResource data type (e.g. no floats to represent vecX, which was typical before)
-- LogicEngine instance now has mandatory argument to specify feature level (use EFeatureLevel::Latest if do not care and want all features)
+ - Make sure to use the right math type to determine the ArrayResource data type (e.g. no floats to represent vecX, which was typical before)
- DataObject class can now hold any of the data types previously held by the removed DataXXX classes
- - example how to port old code: DataVector2I* obj = myScene.createDataVector2I(); obj->setValue(1, 2);
+ - Example how to port old code: DataVector2I* obj = myScene.createDataVector2I(); obj->setValue(1, 2);
to new code: DataObject* obj = myScene.createDataObject(EDataType::Vector2I); obj->setValue(vec2i{ 1, 2 });
- - make sure to use the right math type when setting or getting the value
+ - Make sure to use the right math type when setting or getting the value
- Node::getModelMatrix() / Node::getInverseModelMatrix() use matrix44f as argument
- Replaced std::array type aliases by glm: matrix44f, vec2f, vec3f, vec4f, vec2i, vec3i, vec4i
- LogicEngine::getTotalSerializedSize and getSerializedSize can now be set to use a specific ELuaSavingMode for size calculation
@@ -289,14 +214,55 @@
- The const char* parameters of the public API are replaced by std::string_view.
- The pointers to data memory (std::uint8_t*, unsigned char*) of the public API are replaced by std::byte*.
-### Removed
+### Fixed
+- Fixed possible crash if Texture2DBuffer is recreated with smaller size
+- RamsesMeshNodeBinding now fails update if it receives invalid value (e.g. negative index count)
+- Fixed RamsesNodeBinding visibility property inconsistency if saved with Ramses node 3-state visibility as 'Off'
+ but properties 'enable'=false and 'visible'=true
+- Fixed potential renderer crash when having more than one displays in non-threaded mode and destroying all but one due to missing context enable
+- Fixed race condition when instantiating multiple RamsesFramework instances in different threads
+- RenderGroup no more reports 'contains no meshnodes' validation warning if it has nested RenderGroups with MeshNode(s)
+
+### Removed
+
+- Removed automatic validation when saving scene to a file (also removed the parameter from SaveFileConfig)
+- Removed cmake option `ramses-sdk_BUILD_HEADLESS_SHARED_LIB` for enabling headless shared lib since it always gets built now
+- Removed `IRendererResourceCache`, `DefaultRendererResourceCache` and `RendererConfig::setRendererResourceCache()`
+- Removed `resourceCacheFlag_t` type and updated relavant classes and implementations
+ - Removed `ResourceCacheFlag_DoNotCache`
+ - Removed resourceCacheFlag_t optional argument from all Scene::create*Resource
+ - Removed `resourceCacheFlagTag`
+- Removed default rotation convention from Node::setRotation(vec3f,rotationType)
+- Removed support for 32-bit architectures.
+- Removed `LogicEngine::setStatisticsLogLevel`: periodic log level is always set to Info
+- Removed obsolete `RamsesLogicVersion`, use `RamsesVersion` instead
+- Removed `SceneObject::getSceneId()`, use `SceneObject::getScene().getSceneId()` instead
+- Removed `DisplayConfig::keepEffectsUploaded()` and `--delete-effects` cli option. Effects are always kept uploaded now.
+- Removed `DisplayConfig::setWindowBorderless()` and `--borderless` cli option.
+- Removed ERamsesObjectType::NUMBER_OF_TYPES
+- Removed ETextureFormat::Invalid
+- Removed ramses::AllFeatureLevels array
+- Removed ramses-logic logging API:
+ - `Logger::SetVerbosityLimit()`: Use RamsesFrameworkConfig to set loglevel for context 'RCLI' (Info by default)
+ - `Logger::SetLogHandler()`: Use RamsesFramework::SetLogHandler()
+ - `Logger::SetDefaultLogging()`: Use RamsesFrameworkConfig::setLogLevelConsole(ELogLevel::Off) to disable console output
+- Removed cmake option `ramses-sdk_BUILD_DAEMON`. Now `ramses-deamon` is controlled by cmake option for tools `ramses-sdk_BUILD_TOOLS`
+- Removed `ERenderBufferType` from all API (removed RenderBuffer::getBufferType, changed Scene::createRenderBuffer)
+- Removed `ramses::RamsesUtils::TryConvert`. Use `ramses::object_cast` instead.
+- Removed deprecated method overload `LogicEngine::createLuaInterface` without LuaConfig parameter in favor of providing an empty `LuaConfig` as the default argument.
+ Now modules declaration will always be verified (also when not explicitly providing `LuaConfig`).
+- Removed `LogicEngine::saveToFile()`, `LogicEngine::load*` and `LogicEngine::GetFeatureLevelFrom*` methods. Logic is stored in the ramses scene.
+- Removed logic object ID and related API: `LogicObject::getLogicObjectId`, `LogicEngine::findObjectById`
+ - Use sceneObjectId_t instead as a unique numerical Id for objects
+- Removed `logicfile` command line parameter from ramses-logic-viewer
- Removed cmake option ramses-sdk_CONSOLE_LOGLEVEL (use RamsesFrameworkConfig to configure log levels)
- Removed environment variables CONSOLE_LOGLEVEL and RAMSES_LOGLEVEL (use RamsesFrameworkConfig to configure log levels)
- Removed RamsesFramework::SetConsoleLogLevel (use RamsesFrameworkConfig::setLogLevelConsole)
- Removed AnimationSystem and all related classes, animations moved from Ramses to Ramses Logic.
- Removed text generator.
- Removed visual frame profiler ('fp' Ramsh command).
+- Removed SomeIP support.
- Removed tools for generating and packing effects from shaders (ramses-utils, ramses-resource-tools, ramses-shader-tools).
- Removed ramses-packet-player.
- Removed DCSM support and all related API.
@@ -305,9 +271,9 @@
- Ramses 27 is the last official release which supports Integrity.
- Removed RamsesFramework(argc, argv) constructor, use RamsesFrameworkConfig instead.
- Removed support for warping:
- - removed DisplayConfig::enableWarpingPostEffect()
- - removed IRendererEventHandler::warpingMeshDataUpdated()
- - removed RamsesRenderer::updateWarpingMeshData()
+ - Removed DisplayConfig::enableWarpingPostEffect()
+ - Removed IRendererEventHandler::warpingMeshDataUpdated()
+ - Removed RamsesRenderer::updateWarpingMeshData()
- Removed stream texture from client API. Renderer side stream buffers must be used for embedded compositing on wayland.
- Removed RamsesFrameworkConfig(argc, argv), DisplayConfig(argc, argv), RendererConfig(argc, argv) constructors
- Removed deprecated embedded compositor settings from RendererConfig (use DisplayConfig instead)
@@ -315,19 +281,11 @@
- Removed legacy ZYX (left handed) rotation convention
- Remove related APIs: Node::rotate, Node::setRotation(x,y,z) and Node::getRotation(x,y,z)
- RamsesNode_setRotationNative in JNI Interface uses right-handed Euler_XYZ rotation convention
-- Removed rlogic::EFeatureLevel, ramses::EFeatureLevel is used in whole Ramses SDK instead
- Removed all typed data object classes (DataInt32, DataFloat, DataVector2/3/4/f/i, DataMatrix22/33/44),
all their functionality was moved into DataObject class (see Changed section)
-- Removed rlogic::ERotationType (replaced by ramses::ERotationType)
- Removed rlogic::ELogMessageType (replaced by ramses::ELogLevel)
- Removed deprecated enum ESceneResourceStatus
-### Fixed
-
-- Fixed potential renderer crash when having more than one displays in non-threaded mode and destroying all but one due to missing context enable
-- Fixed race condition when instantiating multiple RamsesFramework instances in different threads
-- RenderGroup no more reports 'contains no meshnodes' validation warning if it has nested RenderGroups with MeshNode(s)
-
## Older releases
27.0.137
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 19b1b0a1b..a6e74d0cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
set(RAMSES_VERSION_MAJOR 28)
set(RAMSES_VERSION_MINOR 0)
set(RAMSES_VERSION_PATCH 0)
-set(RAMSES_VERSION_POSTFIX "-rc5")
+set(RAMSES_VERSION_POSTFIX "")
set(RAMSES_VERSION "${RAMSES_VERSION_MAJOR}.${RAMSES_VERSION_MINOR}.${RAMSES_VERSION_PATCH}${RAMSES_VERSION_POSTFIX}")
project(ramses-sdk
diff --git a/doc/sphinx/classes/index.rst b/doc/sphinx/classes/index.rst
index 9fe81f4d0..899192564 100644
--- a/doc/sphinx/classes/index.rst
+++ b/doc/sphinx/classes/index.rst
@@ -1,6 +1,6 @@
..
-------------------------------------------------------------------------
- Copyright (C) 2021 BMW AG
+ Copyright (C) 2023 BMW AG
-------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -35,11 +35,9 @@ Class Index
logic
-
.. toctree::
:maxdepth: 3
:caption: Ramses Utils
utils
-
diff --git a/doc/sphinx/viewer.rst b/doc/sphinx/viewer.rst
index 78933860f..ff4f30724 100644
--- a/doc/sphinx/viewer.rst
+++ b/doc/sphinx/viewer.rst
@@ -105,28 +105,47 @@ Options
Lua configuration API
==============================================
-The :program:`ramses-viewer` exposes a lua module ``rlogic`` that allows to interact with the viewer's
-logic engine instance. ``rlogic`` mimics the Ramses Logic C++ API and provides some extra interfaces to take
-screenshots and define interactive views.
+The :program:`ramses-viewer` exposes a lua module ``R`` that allows to interact with the scene's
+logic engine instance(s). It also provides interfaces to take screenshots and define interactive views.
--------------------------------------------------
-Logic Nodes
+Logic Engine
--------------------------------------------------
-The module ``rlogic`` provides members to access all Logic Node types:
-
-* ``rlogic.interfaces`` (:cpp:class:`ramses::LuaInterface`)
-* ``rlogic.scripts`` (:cpp:class:`ramses::LuaScript`)
-* ``rlogic.animationNodes`` (:cpp:class:`ramses::AnimationNode`)
-* ``rlogic.timerNodes`` (:cpp:class:`ramses::TimerNode`)
-* ``rlogic.nodeBindings`` (:cpp:class:`ramses::NodeBinding`)
-* ``rlogic.appearanceBindings`` (:cpp:class:`ramses::AppearanceBinding`)
-* ``rlogic.cameraBindings`` (:cpp:class:`ramses::CameraBinding`)
-* ``rlogic.renderPassBindings`` (:cpp:class:`ramses::RenderPassBinding`)
-* ``rlogic.renderGroupBindings`` (:cpp:class:`ramses::RenderGroupBinding`)
-* ``rlogic.meshNodeBindings`` (:cpp:class:`ramses::MeshNodeBinding`)
-* ``rlogic.anchorPoints`` (:cpp:class:`ramses::AnchorPoint`)
-* ``rlogic.skinBindings`` (:cpp:class:`ramses::SkinBinding`)
+``R.logic`` provides access to the scene's logic engines. They can be found by name or scene object id.
+Alternatively all logic engine instances can be returned.
+
+Example:
+
+.. code-block:: lua
+
+ -- returns all LogicEngines (also convenient if there's only 1 logic engine)
+ -- there's no guarantee for a specific order
+ engine0, engine1 = R.logic()
+
+ -- returns the LogicEngine with the name `foo` or nil if it does not exist
+ R.logic["foo"]
+
+ -- returns the LogicEngine with the scene object id `42` or nil if it does not exist
+ R.logic[42]
+
+Logic Nodes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The Logic Engine object has members to access all Logic Node types:
+
+* ``R.logic().interfaces`` (:cpp:class:`ramses::LuaInterface`)
+* ``R.logic().scripts`` (:cpp:class:`ramses::LuaScript`)
+* ``R.logic().animationNodes`` (:cpp:class:`ramses::AnimationNode`)
+* ``R.logic().timerNodes`` (:cpp:class:`ramses::TimerNode`)
+* ``R.logic().nodeBindings`` (:cpp:class:`ramses::NodeBinding`)
+* ``R.logic().appearanceBindings`` (:cpp:class:`ramses::AppearanceBinding`)
+* ``R.logic().cameraBindings`` (:cpp:class:`ramses::CameraBinding`)
+* ``R.logic().renderPassBindings`` (:cpp:class:`ramses::RenderPassBinding`)
+* ``R.logic().renderGroupBindings`` (:cpp:class:`ramses::RenderGroupBinding`)
+* ``R.logic().meshNodeBindings`` (:cpp:class:`ramses::MeshNodeBinding`)
+* ``R.logic().anchorPoints`` (:cpp:class:`ramses::AnchorPoint`)
+* ``R.logic().skinBindings`` (:cpp:class:`ramses::SkinBinding`)
The Logic Node instances can be either found by name or by object id.
Alternatively the node list can be iterated.
@@ -136,26 +155,26 @@ Example:
.. code-block:: lua
-- returns the LuaScript node with the name `foo` or nil if it does not exist
- rlogic.scripts.foo
+ R.logic().scripts.foo
-- returns the LuaScript node with the object id `42` or nil if it does not exist
- rlogic.scripts[42]
+ R.logic().scripts[42]
-- returns the LuaScript node with the name `name with spaces` or nil if it does not exist
- rlogic.scripts["name with spaces"]
+ R.logic().scripts["name with spaces"]
-- iterates through all LuaScript instances
- for script in rlogic.scripts() do
+ for script in R.logic().scripts() do
print(script)
end
.. note::
- Ramses Logic does not guarantee unique names.
+ Ramses does not guarantee unique names.
Also empty names are possible.
---------------------------------------------------
+
Logic Properties
---------------------------------------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Logic Nodes own Logic Properties. They are accessed like this:
@@ -167,25 +186,42 @@ Example:
.. code-block:: lua
- rlogic.scripts.foo.IN.integerProperty.value = 6
- rlogic.scripts.foo.IN.stringProperty.value = "Hello World"
- rlogic.scripts.foo.IN.structProperty.vec3iChild.value = { 42, 44, 0 }
- rlogic.scripts.foo.IN.arrayProperty[1].integerChild.value = 5
+ R.logic().scripts.foo.IN.integerProperty.value = 6
+ R.logic().scripts.foo.IN.stringProperty.value = "Hello World"
+ R.logic().scripts.foo.IN.structProperty.vec3iChild.value = { 42, 44, 0 }
+ R.logic().scripts.foo.IN.arrayProperty[1].integerChild.value = 5
-- returns the property's value
- rlogic.scripts.foo.IN.integerProperty.value
+ R.logic().scripts.foo.IN.integerProperty.value
-- returns the property object
- rlogic.scripts.foo.IN.integerProperty
+ R.logic().scripts.foo.IN.integerProperty
.. note::
Properties can be readonly if they are output properties or linked to an output property.
Trying to set values to them will cause a runtime error.
+
+Logic Engine Update
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The logic engine is automatically updated (:cpp:func:`ramses::LogicEngine::update()`) before
+a new frame is drawn or before a screenshot is stored.
+In batch mode (:option:`ramses-viewer --exec` :option:`ramses-viewer --exec-lua`) it's sometimes useful to explicitly update
+the logic engine state by calling ``R.logic().update()``:
+
+.. code-block:: lua
+
+ R.logic().scripts.foo.IN.color.value = "red"
+ R.logic().update()
+ if not R.logic().scripts.foo.OUT.color.value == {255, 0, 0} then
+ error("unexpected value")
+ end
+
--------------------------------------------------
Views
--------------------------------------------------
-``rlogic.views`` can be used to demonstrate typical scene configurations to the user.
+``R.views`` can be used to demonstrate typical scene configurations to the user.
If the lua script defines views, the user can simply switch between them in the UI
and does not need to know how to configure all the corresponding properties.
@@ -235,41 +271,24 @@ Example:
}
-- assigns the view list
- rlogic.views = {simpleView, animatedView, interactiveView}
+ R.views = {simpleView, animatedView, interactiveView}
--------------------------------------------------
Screenshots
--------------------------------------------------
-Screenshots can be taken by the ``rlogic.screenshot(filename)`` function.
+Screenshots can be taken by the ``R.screenshot(filename)`` function.
The :program:`ramses-viewer` will implicitly update the logic state before.
.. code-block:: lua
- rlogic.scripts.foo.IN.color.value = "red"
- rlogic.screenshot(foo_red.png)
- rlogic.scripts.foo.IN.color.value = "green"
- rlogic.screenshot(foo_green.png)
+ R.logic().scripts.foo.IN.color.value = "red"
+ R.screenshot(foo_red.png)
+ R.logic().scripts.foo.IN.color.value = "green"
+ R.screenshot(foo_green.png)
.. note::
To exclude the Viewer's UI from the screenshot you can set the :option:`ramses-viewer --gui` to either `on` or `off`.
In `on` mode the Viewer creates an offscreen buffer for the scene.
That's why the screenshot's size is independent of the window size and does not contain the Viewer's UI.
-
---------------------------------------------------
-Logic Engine Update
---------------------------------------------------
-
-The logic engine is automatically updated (:cpp:func:`ramses::LogicEngine::update()`) before
-a new frame is drawn or before a screenshot is stored.
-In batch mode (:option:`ramses-viewer --exec` :option:`ramses-viewer --exec-lua`) it's sometimes useful to explicitly update
-the logic engine state by calling ``rlogic.update()``:
-
-.. code-block:: lua
-
- rlogic.scripts.foo.IN.color.value = "red"
- rlogic.update()
- if not rlogic.scripts.foo.OUT.color.value == {255, 0, 0} then
- error("unexpected value")
- end
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index b3d7110d4..bfcf48f4a 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -313,6 +313,11 @@ if(ramses-sdk_BUILD_TOOLS)
imgui/*.cpp
imgui/misc/cpp/*.cpp
)
+
+ add_executable(imgui_binary_to_compressed EXCLUDE_FROM_ALL
+ imgui/misc/fonts/binary_to_compressed_c.cpp
+ )
+ folderizeTarget(imgui_binary_to_compressed)
endif()
diff --git a/include/ramses/client/ArrayBuffer.h b/include/ramses/client/ArrayBuffer.h
index 12cf65b73..4182bc169 100644
--- a/include/ramses/client/ArrayBuffer.h
+++ b/include/ramses/client/ArrayBuffer.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2017 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,14 +20,14 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief The ArrayBuffer is a data object used to provide vertex or index data to #ramses::Geometry::setInputBuffer
* and #ramses::Geometry::setIndices. The buffer data of an ArrayBuffer is not filled initially and can be fully
- * or partially updated in between scene flushes.
+ * or partially updated between scene flushes.
*
* @details If an #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 #ArrayBuffer
* referring to element refer to a single byte within byte array.
+ * @ingroup CoreAPI
*/
class RAMSES_API ArrayBuffer : public SceneObject
{
diff --git a/include/ramses/client/ArrayResource.h b/include/ramses/client/ArrayResource.h
index 70f2fc79e..856c55270 100644
--- a/include/ramses/client/ArrayResource.h
+++ b/include/ramses/client/ArrayResource.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -19,13 +19,13 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief The #ArrayResource stores a data array of a given type. The data is immutable.
- * The resource can be used as input for a #ramses::Geometry.
+ * The resource can be used as an input for a #ramses::Geometry.
*
* @details If an #ArrayResource object is created with type #ramses::EDataType::ByteBlob then an element
* is defined as one byte, rather than a logical vertex element. Hence, number of elements is
- * the same as size in bytes.
+ * the same as the size in bytes.
+ * @ingroup CoreAPI
*/
class RAMSES_API ArrayResource : public Resource
{
diff --git a/include/ramses/client/AttributeInput.h b/include/ramses/client/AttributeInput.h
index dd4ab2955..c757c6c7a 100644
--- a/include/ramses/client/AttributeInput.h
+++ b/include/ramses/client/AttributeInput.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -19,8 +19,8 @@ namespace ramses
}
/**
+ * @brief The AttributeInput is a description of an attribute effect input.
* @ingroup CoreAPI
- * @brief The AttributeInput is a description of an attribute effect input
*/
class RAMSES_API AttributeInput : public EffectInput
{
diff --git a/include/ramses/client/BlitPass.h b/include/ramses/client/BlitPass.h
index ddf33c163..7bbaf4520 100644
--- a/include/ramses/client/BlitPass.h
+++ b/include/ramses/client/BlitPass.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2017 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,11 +20,11 @@ namespace ramses
class RenderBuffer;
/**
- * @ingroup CoreAPI
* @brief The BlitPass blits contents of one RendeBuffer to another. The source and destination
- * RenderBuffer objects must have same type, format and dimensions. BlitPass objects are ordered together
+ * RenderBuffer objects must have the same type, format and dimensions. BlitPass objects are ordered
* using a render order, which is also shared with RenderPass objects, i.e, BlitPass and RenderPass objects
* can all be ordered relative to each other.
+ * @ingroup CoreAPI
*/
class RAMSES_API BlitPass : public SceneObject
{
diff --git a/include/ramses/client/Camera.h b/include/ramses/client/Camera.h
index 81a4746a4..1addcf80e 100644
--- a/include/ramses/client/Camera.h
+++ b/include/ramses/client/Camera.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,10 +20,10 @@ namespace ramses
class DataObject;
/**
- * @ingroup CoreAPI
* @brief The #Camera base class is part of a scene and defines a view into the scene
* defined by the client application. It is also a #Node with transformation.
- * @details A valid camera for rendering must have viewport and frustum set.
+ * @details A valid camera for rendering must have a viewport and a frustum set.
+ * @ingroup CoreAPI
*/
class RAMSES_API Camera : public Node
{
diff --git a/include/ramses/client/ClientObject.h b/include/ramses/client/ClientObject.h
index 04ad5c72e..df33ece98 100644
--- a/include/ramses/client/ClientObject.h
+++ b/include/ramses/client/ClientObject.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -18,8 +18,8 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief The ClientObject is a base class for all client API objects owned by a RamsesClient.
+ * @ingroup CoreAPI
*/
class RAMSES_API ClientObject : public RamsesObject
{
diff --git a/include/ramses/client/DataObject.h b/include/ramses/client/DataObject.h
index 1bfbe9a80..0cdfe5d70 100644
--- a/include/ramses/client/DataObject.h
+++ b/include/ramses/client/DataObject.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2016 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,17 +20,17 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief The DataObject is a data container for storing data within a scene.
* @details The DataObject can be bound to some inputs of some object types
* (e.g. #ramses::Appearance::bindInput or #ramses::Camera::bindViewportOffset).
* When a data object is bound to an input the data object value overrides whatever was previously
* set to that input using its direct setter.
* A single #DataObject can be bound to multiple inputs (also to other #ramses::RamsesObject types
- * where applicable) providing a way to distribute value across instances/inputs.
+ * where applicable) providing a way to distribute a value across instances/inputs.
* Using #DataObject also allows use of data linking across scenes between data object provider and consumer
* (#ramses::Scene::createDataProvider and #ramses::Scene::createDataConsumer) see SDK examples for typical use cases.
* A value set to a #DataObject is then propagated everywhere it is bound to and it is linked to.
+ * @ingroup CoreAPI
*/
class RAMSES_API DataObject : public SceneObject
{
diff --git a/include/ramses/client/Effect.h b/include/ramses/client/Effect.h
index e1fe07951..357e164e8 100644
--- a/include/ramses/client/Effect.h
+++ b/include/ramses/client/Effect.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -27,8 +27,8 @@ namespace ramses
class AttributeInput;
/**
- * @ingroup CoreAPI
* @brief An effect describes how an object will be rendered to the screen.
+ * @ingroup CoreAPI
*/
class RAMSES_API Effect : public Resource
{
diff --git a/include/ramses/client/EffectDescription.h b/include/ramses/client/EffectDescription.h
index ca40476f1..7b94b31d1 100644
--- a/include/ramses/client/EffectDescription.h
+++ b/include/ramses/client/EffectDescription.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,8 +22,8 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief An effect description holds all necessary information for an effect to be created.
+ * @ingroup CoreAPI
*/
class RAMSES_API EffectDescription
{
diff --git a/include/ramses/client/EffectInput.h b/include/ramses/client/EffectInput.h
index 4629e93a2..1b60359ae 100644
--- a/include/ramses/client/EffectInput.h
+++ b/include/ramses/client/EffectInput.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -21,8 +21,8 @@ namespace ramses
}
/**
+ * @brief The EffectInput is a description of an effect input.
* @ingroup CoreAPI
- * @brief The EffectInput is a description of an effect input
*/
class RAMSES_API EffectInput
{
diff --git a/include/ramses/client/Geometry.h b/include/ramses/client/Geometry.h
index ffbdac9d3..1a48e5336 100644
--- a/include/ramses/client/Geometry.h
+++ b/include/ramses/client/Geometry.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -23,8 +23,8 @@ namespace ramses
class Effect;
/**
- * @ingroup CoreAPI
* @brief A geometry binding together with an appearance describe how an object will be rendered to the screen.
+ * @ingroup CoreAPI
*/
class RAMSES_API Geometry : public SceneObject
{
diff --git a/include/ramses/client/IClientEventHandler.h b/include/ramses/client/IClientEventHandler.h
index f54f92381..fe3066dd9 100644
--- a/include/ramses/client/IClientEventHandler.h
+++ b/include/ramses/client/IClientEventHandler.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2017 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,10 +20,10 @@ namespace ramses
class SceneReference;
/**
- * @ingroup CoreAPI
* @brief Provides an interface for handling the result of client events.
* Implementation of this interface must be passed to RamsesClient::dispatchEvents
* which will in return invoke methods of the interface according to events that occurred since last dispatching.
+ * @ingroup CoreAPI
*/
class RAMSES_API IClientEventHandler
{
diff --git a/include/ramses/client/MeshNode.h b/include/ramses/client/MeshNode.h
index 91ad41250..6238a8641 100644
--- a/include/ramses/client/MeshNode.h
+++ b/include/ramses/client/MeshNode.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,9 +22,9 @@ namespace ramses
class Effect;
/**
- * @ingroup CoreAPI
* @brief The MeshNode holds all information which is
* needed to render an object to the screen.
+ * @ingroup CoreAPI
*/
class RAMSES_API MeshNode : public Node
{
diff --git a/include/ramses/client/Node.h b/include/ramses/client/Node.h
index 44d20ae1d..daf100595 100644
--- a/include/ramses/client/Node.h
+++ b/include/ramses/client/Node.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -21,9 +21,9 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief The Node is the base class of all nodes and provides
* scene graph functionality which propagates to its children.
+ * @ingroup CoreAPI
*/
class RAMSES_API Node : public SceneObject
{
diff --git a/include/ramses/client/OrthographicCamera.h b/include/ramses/client/OrthographicCamera.h
index 0b6741302..34fb4e13a 100644
--- a/include/ramses/client/OrthographicCamera.h
+++ b/include/ramses/client/OrthographicCamera.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -13,10 +13,10 @@
namespace ramses
{
/**
- * @ingroup CoreAPI
* @brief The OrthographicCamera is a local camera which defines an orthographic view into the scene.
* @details A valid camera for rendering must have viewport and frustum set, see #ramses::Camera
* for ways to set these parameters.
+ * @ingroup CoreAPI
*/
class RAMSES_API OrthographicCamera : public Camera
{
diff --git a/include/ramses/client/PerspectiveCamera.h b/include/ramses/client/PerspectiveCamera.h
index 96488ef1d..e8b784d13 100644
--- a/include/ramses/client/PerspectiveCamera.h
+++ b/include/ramses/client/PerspectiveCamera.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -13,11 +13,11 @@
namespace ramses
{
/**
- * @ingroup CoreAPI
* @brief The #PerspectiveCamera is a local camera which defines a perspective view into the scene.
* @details A valid camera for rendering must have viewport and frustum set.
* Frustum planes can be set using #ramses::Camera::setFrustum or #ramses::PerspectiveCamera::setFrustum,
- * depending if input is concrete frustum planes or field of view and aspect ratio.
+ * depending if the inputs are concrete frustum planes or field of view and aspect ratio.
+ * @ingroup CoreAPI
*/
class RAMSES_API PerspectiveCamera : public Camera
{
diff --git a/include/ramses/client/PickableObject.h b/include/ramses/client/PickableObject.h
index b099f5b74..40ac6af7c 100644
--- a/include/ramses/client/PickableObject.h
+++ b/include/ramses/client/PickableObject.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2019 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -21,10 +21,9 @@ namespace ramses
class Camera;
/**
- * @ingroup CoreAPI
* @brief PickableObject provides a way to specify a 'pickable' area.
- * @details The purpose of the PickableObject is to enable user to add 'pickable' components to a scene.
- * When this area is picked (see ramses::RamsesRenderer API) a message is sent to RamsesClient with list of picked objects,
+ * @details The purpose of the PickableObject is to enable the user to add 'pickable' components to a scene.
+ * When this area is picked (see ramses::RamsesRenderer API) a message is sent to RamsesClient with the list of picked objects,
* these can be dispatched and handled using ramses::IRendererEventHandler::objectsPicked.
* Geometry specifies a triangle list (see ramses::Scene::createPickableObject for geometry requirements).
* PickableObject is a ramses::Node and as such can be placed in scene transformation topology,
@@ -34,16 +33,17 @@ namespace ramses
* In order to create a valid PickableObject it is mandatory to set a Camera. This is needed for the intersection algorithm
* to determine whether it was picked, the camera is needed to unproject the rasterized triangles.
* Typically the camera will be same as the one used to render the actual renderable but in some cases
- * it makes sense to have different camera for rendering and picking.
+ * it makes sense to have different cameras for rendering and picking.
*
* Usage example: we have a Ramses scene with a 3D car made of multiple MeshNodes within a transformation node topology,
* we want to make the car pickable:
* 1) Precompute a simplified geometry representation of the car (e.g. a bounding box) so that it can be represented as a single geometry
- * with minimum amount of triangles (reduce overhead of intersection computation).
+ * with a minimum number of triangles (reduce overhead of intersection computation).
* 2) Create a PickableObject with the simplified geometry.
* 3) Set the PickableObject's parent node to be the 3D car's root node. This way the pickable geometry will always be transformed together with the car.
* 4) Assign the camera used to render the car to our PickableObject - the pickable geometry was computed from the car's geometry
- * and therefore should use same camera for both rendering and picking.
+ * and therefore should use the same camera for both rendering and picking.
+ * @ingroup CoreAPI
*/
class RAMSES_API PickableObject : public Node
{
diff --git a/include/ramses/client/RamsesClient.h b/include/ramses/client/RamsesClient.h
index e9712875b..a6ebe7f7c 100644
--- a/include/ramses/client/RamsesClient.h
+++ b/include/ramses/client/RamsesClient.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -34,9 +34,9 @@ namespace ramses
/**
* @brief Entry point of RAMSES client API.
- * @ingroup CoreAPI
*
* The RAMSES client class handles application state and and is a factory for scenes and client resources.
+ * @ingroup CoreAPI
*/
class RAMSES_API RamsesClient : public RamsesObject
{
diff --git a/include/ramses/client/RenderBuffer.h b/include/ramses/client/RenderBuffer.h
index 9c70af1f4..4a70c9d81 100644
--- a/include/ramses/client/RenderBuffer.h
+++ b/include/ramses/client/RenderBuffer.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -19,12 +19,12 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief RenderBuffer can be used with RenderTarget as buffer for writing or with TextureSampler as buffer for reading.
*
* @details A RenderBuffer can be used by one or more RenderTargets for rendering content into it.
- * There are two basic types of RenderBuffers - color and depth, depth buffer can have additionally stencil data.
+ * There are two basic types of RenderBuffers - color and depth, depth buffer can additionally have stencil data.
* A RenderBuffer can be used by one or more TextureSamplers for sampling data from it in a shader.
+ * @ingroup CoreAPI
*/
class RAMSES_API RenderBuffer : public SceneObject
{
diff --git a/include/ramses/client/RenderGroup.h b/include/ramses/client/RenderGroup.h
index c24d9485c..fb6c4f357 100644
--- a/include/ramses/client/RenderGroup.h
+++ b/include/ramses/client/RenderGroup.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,9 +20,10 @@ namespace ramses
class MeshNode;
/**
- * @ingroup CoreAPI
* @brief The RenderGroup is a container used to collect renderables which are supposed
- * to be rendered together. Renderables added to it can be ordered within the RenderGroup
+ * to be rendered together.
+ *
+ * Renderables added to it can be ordered within the RenderGroup
* so that they will be rendered in given order. RenderGroup can then be added to a RenderPass
* (again with optional order of RenderGroup within the RenderPass) so a hierarchical ordering
* of renderables can be achieved.
@@ -31,6 +32,7 @@ namespace ramses
* renderables in all nested RenderGroups will be rendered within the RenderPass as well.
* The order inside a nested RenderGroup is local, i.e. all its renderables/RenderGroups are
* rendered before the next renderable/RenderGroup of its parent RenderGroup.
+ * @ingroup CoreAPI
*/
class RAMSES_API RenderGroup : public SceneObject
{
diff --git a/include/ramses/client/RenderGroupMeshIterator.h b/include/ramses/client/RenderGroupMeshIterator.h
index f01a50850..51acaca4d 100644
--- a/include/ramses/client/RenderGroupMeshIterator.h
+++ b/include/ramses/client/RenderGroupMeshIterator.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -24,8 +24,8 @@ namespace ramses
class MeshNode;
/**
- * @ingroup CoreAPI
* @brief The RenderGroupMeshIterator traverses MeshNodes in a RenderGroup.
+ * @ingroup CoreAPI
*/
class RAMSES_API RenderGroupMeshIterator
{
diff --git a/include/ramses/client/RenderPass.h b/include/ramses/client/RenderPass.h
index 45dcb5806..30162b718 100644
--- a/include/ramses/client/RenderPass.h
+++ b/include/ramses/client/RenderPass.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -23,7 +23,6 @@ namespace ramses
class RenderTarget;
/**
- * @ingroup CoreAPI
* @brief The RenderPass is a container used to collect meshes which are supposed
* to be rendered together.
* @details A RenderPass has a Camera which is used for all MeshNodes
@@ -32,6 +31,7 @@ namespace ramses
* of the RenderPass. RenderPass objects are ordered together using a render order,
* which is also shared with BlitPass objects, i.e, RenderPass and BlitPass objects
* can all be ordered relative to each other.
+ * @ingroup CoreAPI
*/
class RAMSES_API RenderPass : public SceneObject
{
diff --git a/include/ramses/client/RenderPassGroupIterator.h b/include/ramses/client/RenderPassGroupIterator.h
index 0a86e20e4..6acc0e6bb 100644
--- a/include/ramses/client/RenderPassGroupIterator.h
+++ b/include/ramses/client/RenderPassGroupIterator.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -24,8 +24,8 @@ namespace ramses
class RenderGroup;
/**
- * @ingroup CoreAPI
* @brief The RenderPassGroupIterator traverses RenderGroups in a RenderPass.
+ * @ingroup CoreAPI
*/
class RAMSES_API RenderPassGroupIterator
{
diff --git a/include/ramses/client/RenderTarget.h b/include/ramses/client/RenderTarget.h
index d18b03fc4..9f87fffbb 100644
--- a/include/ramses/client/RenderTarget.h
+++ b/include/ramses/client/RenderTarget.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -18,8 +18,8 @@ namespace ramses
}
/**
+ * @brief The RenderTarget can be used as an output for a RenderPass.
* @ingroup CoreAPI
- * @brief The RenderTarget can be used as an output for a RenderPass
*/
class RAMSES_API RenderTarget : public SceneObject
{
diff --git a/include/ramses/client/RenderTargetDescription.h b/include/ramses/client/RenderTargetDescription.h
index fa46e5119..c23bcb9f9 100644
--- a/include/ramses/client/RenderTargetDescription.h
+++ b/include/ramses/client/RenderTargetDescription.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2017 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,8 +22,8 @@ namespace ramses
class RenderBuffer;
/**
- * @ingroup CoreAPI
* @brief RenderTargetDescription holds all necessary information for a RenderTarget to be created.
+ * @ingroup CoreAPI
*/
class RAMSES_API RenderTargetDescription
{
diff --git a/include/ramses/client/Resource.h b/include/ramses/client/Resource.h
index fdb74372d..19ce85dce 100644
--- a/include/ramses/client/Resource.h
+++ b/include/ramses/client/Resource.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -18,8 +18,8 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief The Resource is the base class of all resources, such as arrays and textures.
+ * @ingroup CoreAPI
*/
class RAMSES_API Resource : public SceneObject
{
diff --git a/include/ramses/client/SaveFileConfig.h b/include/ramses/client/SaveFileConfig.h
index ab0582b58..b8a0f3ac9 100644
--- a/include/ramses/client/SaveFileConfig.h
+++ b/include/ramses/client/SaveFileConfig.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2022 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -26,6 +26,7 @@ namespace ramses
* This config file is designed to work with the Ramses Composer editor, but you can use the metadata to store
* version and export information from any exporter (or script). Use the config to trace the origin and
* export environment of assets during runtime.
+ * @ingroup CoreAPI
*/
class RAMSES_API SaveFileConfig
{
diff --git a/include/ramses/client/Scene.h b/include/ramses/client/Scene.h
index 9a123c908..a732747f8 100644
--- a/include/ramses/client/Scene.h
+++ b/include/ramses/client/Scene.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -68,10 +68,10 @@ namespace ramses
class LogicEngine;
/**
- * @ingroup CoreAPI
* @brief The Scene holds a scene graph.
* It is the essential class for distributing
* content to the ramses system.
+ * @ingroup CoreAPI
*/
class RAMSES_API Scene : public ClientObject
{
diff --git a/include/ramses/client/SceneConfig.h b/include/ramses/client/SceneConfig.h
index b2fd703be..972eeef9b 100644
--- a/include/ramses/client/SceneConfig.h
+++ b/include/ramses/client/SceneConfig.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,9 +22,9 @@ namespace ramses
}
/**
+ * @brief The SceneConfig holds a set of parameters to be used when creating a scene or loading a scene from file/memory.
+ * Some parameters are only relevant for loading a scene.
* @ingroup CoreAPI
- * @brief The SceneConfig holds a set of parameters to be used when creating a scene or loading the scene from file/memory.
- * Some parameters are only relevant for loading scene.
*/
class RAMSES_API SceneConfig
{
diff --git a/include/ramses/client/SceneGraphIterator.h b/include/ramses/client/SceneGraphIterator.h
index 99b526e8e..678ce801e 100644
--- a/include/ramses/client/SceneGraphIterator.h
+++ b/include/ramses/client/SceneGraphIterator.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -29,8 +29,8 @@ namespace ramses
class Node;
/**
+ * @brief A SceneObjectIterator can iterate through the nodes in the scene graph with the order specified as the traversal style.
* @ingroup CoreAPI
- * @brief A SceneObjectIterator can iterate through the nodes in the scene graph with the order specified as traversal style
*/
class RAMSES_API SceneGraphIterator
{
diff --git a/include/ramses/client/SceneIterator.h b/include/ramses/client/SceneIterator.h
index dc2dc34ad..ebd4d370b 100644
--- a/include/ramses/client/SceneIterator.h
+++ b/include/ramses/client/SceneIterator.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -21,10 +21,10 @@ namespace ramses
class Scene;
/**
- * @ingroup CoreAPI
* @brief The SceneIterator traverses scenes in a RamsesClient.
*
- * It provides a way to traverse all scenes created with a given client.
+ * SceneIterator provides a way to traverse all scenes created with a given client.
+ * @ingroup CoreAPI
*/
class RAMSES_API SceneIterator
{
diff --git a/include/ramses/client/SceneObject.h b/include/ramses/client/SceneObject.h
index f458818ee..1fc468a9c 100644
--- a/include/ramses/client/SceneObject.h
+++ b/include/ramses/client/SceneObject.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,8 +20,8 @@ namespace ramses
class Scene;
/**
- * @ingroup CoreAPI
* @brief The SceneObject is a base class for all client API objects owned by a Scene.
+ * @ingroup CoreAPI
*/
class RAMSES_API SceneObject : public ClientObject
{
diff --git a/include/ramses/client/SceneObjectIterator.h b/include/ramses/client/SceneObjectIterator.h
index 22e94582f..c80d158e9 100644
--- a/include/ramses/client/SceneObjectIterator.h
+++ b/include/ramses/client/SceneObjectIterator.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,10 +20,10 @@ namespace ramses
class Scene;
/**
- * @ingroup CoreAPI
* @brief The SceneObjectIterator traverses objects in a Scene.
*
- * It provides a way to traverse all objects owned by a given scene.
+ * SceneObjectIterator provides a way to traverse all objects owned by a given scene.
+ * @ingroup CoreAPI
*/
class RAMSES_API SceneObjectIterator
{
diff --git a/include/ramses/client/SceneReference.h b/include/ramses/client/SceneReference.h
index 2a92ef0a6..50954f636 100644
--- a/include/ramses/client/SceneReference.h
+++ b/include/ramses/client/SceneReference.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -19,7 +19,6 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief The SceneReference object refers to another ramses scene using its sceneId.
* @details The SceneReference object references a scene, which might be otherwise unknown
* to this RamsesClient, but is or expected to be known to a RamsesRenderer subscribed to its master scene
@@ -28,7 +27,7 @@ namespace ramses
* results of those requests are reported asynchronously in form of event callbacks, see #ramses::IClientEventHandler.
*
* There cannot be multiple instances of SceneReference referring to the same sceneId, however SceneReference
- * can be destroyed using #ramses::Scene::destroy and re-created with same sceneId in another scene,
+ * can be destroyed using #ramses::Scene::destroy and re-created with the same sceneId in another scene,
* i.e. change its 'master' scene.
* It is recommended to get SceneReference to #ramses::RendererSceneState::Available state and wait for confirmation
* (#ramses::IClientEventHandler::sceneReferenceStateChanged) before destroying it, otherwise the scene remains on renderer
@@ -37,6 +36,7 @@ namespace ramses
* Even though recommended, setting referenced scene to Available before destroying is not strictly required,
* so it is possible to change its master scene regardless of its actual state on renderer side (even if actively rendered)
* but this should be done only with extra caution and understanding of the consequences mentioned above.
+ * @ingroup CoreAPI
*/
class RAMSES_API SceneReference : public SceneObject
{
diff --git a/include/ramses/client/Texture2D.h b/include/ramses/client/Texture2D.h
index 05ce03dc0..510433d55 100644
--- a/include/ramses/client/Texture2D.h
+++ b/include/ramses/client/Texture2D.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,8 +22,8 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief Texture represents a 2-D texture resource.
+ * @ingroup CoreAPI
*/
class RAMSES_API Texture2D : public Resource
{
diff --git a/include/ramses/client/Texture2DBuffer.h b/include/ramses/client/Texture2DBuffer.h
index 99b0a4f50..41d41f020 100644
--- a/include/ramses/client/Texture2DBuffer.h
+++ b/include/ramses/client/Texture2DBuffer.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2017 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,13 +20,15 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief The Texture2DBuffer is a mutable texture buffer used to hold texture data with the possibility
- * to perform partial updates. This object _must_ be initialized with data, otherwise the contents of it
+ * to perform partial updates.
+ *
+ * This object _must_ be initialized with data, otherwise the contents of it
* are not specified (garbage data or black, depending on driver behavior).
* The number of mipmap levels is user given value and the size of the mipchain is computed
* according to OpenGL specification (each further mipMap level has half the size of the previous
- * mipMap level). Refer to documentation of glTexStorage2D for more details.
+ * mipMap level). Refer to the documentation of glTexStorage2D for more details.
+ * @ingroup CoreAPI
*/
class RAMSES_API Texture2DBuffer : public SceneObject
{
diff --git a/include/ramses/client/Texture3D.h b/include/ramses/client/Texture3D.h
index e0b97d4e9..12dabdd5d 100644
--- a/include/ramses/client/Texture3D.h
+++ b/include/ramses/client/Texture3D.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,8 +20,8 @@ namespace ramses
}
/**
+ * @brief Texture represents a texture resource.
* @ingroup CoreAPI
- * @brief Texture represents a texture resource
*/
class RAMSES_API Texture3D : public Resource
{
diff --git a/include/ramses/client/TextureCube.h b/include/ramses/client/TextureCube.h
index 8c5be83cc..7a4ae715a 100644
--- a/include/ramses/client/TextureCube.h
+++ b/include/ramses/client/TextureCube.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -23,8 +23,8 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief TextureCube stores pixel data with 6 equally sized quadratic faces.
+ * @ingroup CoreAPI
*/
class RAMSES_API TextureCube : public Resource
{
diff --git a/include/ramses/client/TextureSampler.h b/include/ramses/client/TextureSampler.h
index 41eff0df6..a97deb96c 100644
--- a/include/ramses/client/TextureSampler.h
+++ b/include/ramses/client/TextureSampler.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -26,8 +26,8 @@ namespace ramses
class RenderBuffer;
/**
+ * @brief The TextureSampler holds a texture and its sampling parameters.
* @ingroup CoreAPI
- * @brief The TextureSampler holds a texture and its sampling parameters
*/
class RAMSES_API TextureSampler : public SceneObject
{
diff --git a/include/ramses/client/TextureSamplerExternal.h b/include/ramses/client/TextureSamplerExternal.h
index b77a786ff..422d61c99 100644
--- a/include/ramses/client/TextureSamplerExternal.h
+++ b/include/ramses/client/TextureSamplerExternal.h
@@ -18,9 +18,9 @@ namespace ramses
}
/**
+ * @brief #ramses::TextureSamplerExternal is used to sample from external textures data when bound
+ * to a #ramses::Appearance uniform input (#ramses::Appearance::setInputTexture called with #ramses::TextureSamplerExternal).
* @ingroup CoreAPI
- * @brief The #ramses::TextureSamplerExternal is used to sample from external textures data when bound
- * to a #ramses::Appearance uniform input (#ramses::Appearance::setInputTexture called with #ramses::TextureSamplerExternal)
*/
class RAMSES_API TextureSamplerExternal : public SceneObject
{
diff --git a/include/ramses/client/TextureSamplerMS.h b/include/ramses/client/TextureSamplerMS.h
index 9e8fa7f46..196bb1e4f 100644
--- a/include/ramses/client/TextureSamplerMS.h
+++ b/include/ramses/client/TextureSamplerMS.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -18,9 +18,9 @@ namespace ramses
}
/**
+ * @brief #ramses::TextureSamplerMS is used to sample multisampled data when bound
+ * to a #ramses::Appearance uniform input (#ramses::Appearance::setInputTexture called with #ramses::TextureSamplerMS).
* @ingroup CoreAPI
- * @brief The #ramses::TextureSamplerMS is used to sample multisampled data when bound
- * to a #ramses::Appearance uniform input (#ramses::Appearance::setInputTexture called with #ramses::TextureSamplerMS)
*/
class RAMSES_API TextureSamplerMS : public SceneObject
{
diff --git a/include/ramses/client/UniformInput.h b/include/ramses/client/UniformInput.h
index 382c4bcfb..263f02b03 100644
--- a/include/ramses/client/UniformInput.h
+++ b/include/ramses/client/UniformInput.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -19,8 +19,8 @@ namespace ramses
}
/**
+ * @brief The UniformInput is a description of an uniform effect input.
* @ingroup CoreAPI
- * @brief The UniformInput is a description of an uniform effect input
*/
class RAMSES_API UniformInput : public EffectInput
{
diff --git a/include/ramses/client/logic/AnchorPoint.h b/include/ramses/client/logic/AnchorPoint.h
index 69d645176..4e8b8739d 100644
--- a/include/ramses/client/logic/AnchorPoint.h
+++ b/include/ramses/client/logic/AnchorPoint.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2022 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -25,7 +25,7 @@ namespace ramses::internal
namespace ramses
{
/**
- * Anchor point is a #ramses::LogicNode which calculates viewport coordinates (and depth) of a Ramses node's origin.
+ * @brief Anchor point is a #ramses::LogicNode which calculates viewport coordinates (and depth) of a Ramses node's origin.
* The projected coordinates are accessible via its output property and can be linked to another logic node.
* Anchor point requires a #ramses::NodeBinding and a #ramses::CameraBinding at creation time, see #ramses::LogicEngine::createAnchorPoint.
*
@@ -64,6 +64,7 @@ namespace ramses
* the outputs only if anything changed. Anchor point depends on Ramses objects and their states, which cannot be easily monitored
* and therefore it has to be updated every time #ramses::LogicEngine::update is called. For this reason it is highly recommended
* to keep the number of anchor nodes to a necessary minimum.
+ * @ingroup LogicAPI
*/
class RAMSES_API AnchorPoint : public LogicNode
{
diff --git a/include/ramses/client/logic/AnimationNode.h b/include/ramses/client/logic/AnimationNode.h
index aff6b5494..d6755aabe 100644
--- a/include/ramses/client/logic/AnimationNode.h
+++ b/include/ramses/client/logic/AnimationNode.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2021 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,7 +22,8 @@ namespace ramses::internal
namespace ramses
{
/**
- * Animation node can be used to animate properties in logic network.
+ * @brief Animation node can be used to animate properties in logic network.
+ *
* Animation node itself is a logic node and has a set of input and output properties:
* - Fixed inputs:
* - progress (float) - point within [0;1] normalized range of where to jump to in the animation
@@ -38,7 +39,7 @@ namespace ramses
* will be represented as output property with name of the channel (#ramses::AnimationChannel::name)
* and a value of type matching element in #ramses::AnimationChannel::keyframes.
* If the data type of keyframes is #ramses::EPropertyType::Array (i.e. each keyframe is represented
- * by an array of floats), the output property is also of array type and contains a corresponding
+ * by an array of floats), the output property is also of array type and contains corresponding
* number of children properties of type #ramses::EPropertyType::Float.
* Channel value output is a result of keyframes interpolation based on the 'progress' input above,
* it can be linked to another logic node input to use the animation result.
@@ -48,7 +49,7 @@ namespace ramses
* - [channelName] (struct)
* - timestamps (array of float) - each element represents a timestamp value
* - keyframes (array of T) - each element represents a keyframe value
- * - type T is data type matching this channel original keyframes
+ * - type T is the data type matching this channel's original keyframes
*
* During update when 'progress' input is set the following logic is executed:
* - calculate local animation time based on progress
@@ -57,13 +58,14 @@ namespace ramses
* - interpolate between them according to the interpolation type of that channel,
* - and finally set this value to the channel's output property.
*
- * Note that all channel outputs will always have a value determined by corresponding keyframes, this includes
+ * Note that all channel outputs will always have a value determined by corresponding keyframes,
* also when the time falls outside of the first/last animation timestamps:
* - channel output value equals first keyframe for any time at or before the first keyframe timestamp
* - channel output value equals last keyframe for any time at or after the last keyframe timestamp
- * This can be useful for example when needing to initialize the outputs before playing the animation yet,
+ * This can be useful for example when it is needed to initialize the outputs before playing the animation,
* when updating the animation node with progress 0, the logic will execute and update outputs to their
* first keyframes.
+ * @ingroup LogicAPI
*/
class RAMSES_API AnimationNode : public LogicNode
{
diff --git a/include/ramses/client/logic/AnimationNodeConfig.h b/include/ramses/client/logic/AnimationNodeConfig.h
index fda224095..089446de6 100644
--- a/include/ramses/client/logic/AnimationNodeConfig.h
+++ b/include/ramses/client/logic/AnimationNodeConfig.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2022 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,7 +20,8 @@ namespace ramses::internal
namespace ramses
{
/**
- * Holds data and settings for #ramses::AnimationNode creation using #ramses::LogicEngine::createAnimationNode.
+ * Holds the data and settings for #ramses::AnimationNode creation using #ramses::LogicEngine::createAnimationNode.
+ * @ingroup LogicAPI
*/
class RAMSES_API AnimationNodeConfig
{
diff --git a/include/ramses/client/logic/AppearanceBinding.h b/include/ramses/client/logic/AppearanceBinding.h
index e1cacaecd..5b69fef13 100644
--- a/include/ramses/client/logic/AppearanceBinding.h
+++ b/include/ramses/client/logic/AppearanceBinding.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -45,7 +45,7 @@ namespace ramses
* - any uniform with attached semantics (e.g. display resolution) - see ramses::EEffectUniformSemantic docs
*
* Uniform types which are not supported are not available when queried over #ramses::LogicNode::getInputs.
- *
+ * @ingroup LogicAPI
*/
class RAMSES_API AppearanceBinding : public RamsesBinding
{
diff --git a/include/ramses/client/logic/CameraBinding.h b/include/ramses/client/logic/CameraBinding.h
index 58e6879a7..f1ad1788f 100644
--- a/include/ramses/client/logic/CameraBinding.h
+++ b/include/ramses/client/logic/CameraBinding.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2021 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -26,11 +26,11 @@ namespace ramses::internal
namespace ramses
{
/**
- * The CameraBinding is a type of #ramses::RamsesBinding which allows the #ramses::LogicEngine to control instances of ramses::Camera.
- * CameraBinding's can be created with #ramses::LogicEngine::createCameraBinding or #ramses::LogicEngine::createCameraBindingWithFrustumPlanes,
+ * #CameraBinding is a type of #ramses::RamsesBinding which allows the #ramses::LogicEngine to control instances of ramses::Camera.
+ * CameraBinding can be created with #ramses::LogicEngine::createCameraBinding or #ramses::LogicEngine::createCameraBindingWithFrustumPlanes,
* which affects the set of input properties that will be used to control camera frustum as described below.
*
- * The #CameraBinding has a static link to a ramses::Camera. After creation, #ramses::LogicNode::getInputs will
+ * #CameraBinding has a static link to a ramses::Camera. After creation, #ramses::LogicNode::getInputs will
* return a struct property with children equivalent to the camera settings of the provided ramses::Camera.
*
* There are two types of ramses::Camera:
@@ -48,7 +48,7 @@ namespace ramses
* To avoid unexpected behavior, we highly recommend setting all viewport values together, and also setting all frustum planes together
* (either by link or by setting them directly). This way unwanted behavior can be avoided.
*
- * Since the CameraBinding derives from #ramses::RamsesBinding, it also provides the #ramses::LogicNode::getInputs
+ * Since #CameraBinding derives from #ramses::RamsesBinding, it also provides the #ramses::LogicNode::getInputs
* and #ramses::LogicNode::getOutputs method. For this class, the methods behave as follows:
* - #ramses::LogicNode::getInputs: returns inputs struct with two child properties: viewport and frustum.
* - 'viewport' (type struct) with these children:
@@ -69,13 +69,14 @@ namespace ramses
* - 'farPlane' (type Float) - frustum plane far
* - 'fieldOfView' (type Float) - frustum field of view in degrees
* - 'aspectRatio' (type Float) - aspect ratio of frustum width / frustum height
- * Full set of frustum planes properties will be present if camera is ramses::Orthographic (regardless of which create method was used)
- * or camera is ramses::PerspectiveCamera and #ramses::LogicEngine::createCameraBindingWithFrustumPlanes was used to create it.
- * Simplified set of frustum properties will be present if camera is ramses::PerspectiveCamera and #ramses::LogicEngine::createCameraBinding was used to create it.
- * Refer to ramses::Camera, ramses::PerspectiveCamera and ramses::OrthographicCamera for meaning and constraints of all these inputs.
+ * Full set of frustum planes properties will be present if the camera is ramses::Orthographic (regardless of which create method was used)
+ * or if the camera is ramses::PerspectiveCamera and #ramses::LogicEngine::createCameraBindingWithFrustumPlanes was used to create it.
+ * Simplified set of frustum properties will be present if the camera is ramses::PerspectiveCamera and #ramses::LogicEngine::createCameraBinding was used to create it.
+ * Refer to ramses::Camera, ramses::PerspectiveCamera and ramses::OrthographicCamera for the meanings and constraints of all these inputs.
*
- * - #ramses::LogicNode::getOutputs: returns always nullptr, because a #CameraBinding does not have outputs,
- * it implicitly controls the ramses Camera
+ * - #ramses::LogicNode::getOutputs: always returns nullptr, because a #CameraBinding does not have outputs,
+ * it implicitly controls the ramses Camera.
+ * @ingroup LogicAPI
*/
class RAMSES_API CameraBinding : public RamsesBinding
{
diff --git a/include/ramses/client/logic/DataArray.h b/include/ramses/client/logic/DataArray.h
index 47987259b..29a3ba2d7 100644
--- a/include/ramses/client/logic/DataArray.h
+++ b/include/ramses/client/logic/DataArray.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2021 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -24,6 +24,7 @@ namespace ramses
{
/**
* Storage for data - e.g. animation data like keyframes or timestamps.
+ * @ingroup LogicAPI
*/
class RAMSES_API DataArray : public LogicObject
{
diff --git a/include/ramses/client/logic/LogicEngine.h b/include/ramses/client/logic/LogicEngine.h
index 5a4d84873..6ac40045e 100644
--- a/include/ramses/client/logic/LogicEngine.h
+++ b/include/ramses/client/logic/LogicEngine.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -79,13 +79,13 @@ namespace ramses
};
/**
- * @ingroup LogicAPI
* Central object which creates and manages the lifecycle and execution
* of scripts, bindings, and all other objects supported by the Ramses Logic library.
*
* - Use the create[Type] methods to create various objects, use #destroy() to delete them.
- * - Use #link and #unlink to connect data properties between these objects
- * - use #update() to trigger the execution of all objects
+ * - Use #link and #unlink to connect data properties between these objects.
+ * - Use #update() to trigger the execution of all objects.
+ * @ingroup LogicAPI
*/
class RAMSES_API LogicEngine : public SceneObject
{
diff --git a/include/ramses/client/logic/LogicEngineReport.h b/include/ramses/client/logic/LogicEngineReport.h
index 4ce2ddffa..31a3d4a59 100644
--- a/include/ramses/client/logic/LogicEngineReport.h
+++ b/include/ramses/client/logic/LogicEngineReport.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2021 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -25,8 +25,10 @@ namespace ramses
/**
* A collection of results from #ramses::LogicEngine::update which can be used
* for debugging or profiling logic node networks.
+ *
* Can be obtained using #ramses::LogicEngine::getLastUpdateReport after an update with enabled reporting
* (#ramses::LogicEngine::enableUpdateReport).
+ * @ingroup LogicAPI
*/
class RAMSES_API LogicEngineReport
{
diff --git a/include/ramses/client/logic/LogicNode.h b/include/ramses/client/logic/LogicNode.h
index 472842b29..e79b6f88c 100644
--- a/include/ramses/client/logic/LogicNode.h
+++ b/include/ramses/client/logic/LogicNode.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -23,12 +23,15 @@ namespace ramses
/**
* A base class for multiple logic classes which provides a unified interface to their
- * inputs and outputs. Some subclasses don't have inputs or outputs - in that case the
+ * inputs and outputs.
+ *
+ * Some subclasses don't have inputs or outputs - in that case the
* #getInputs or #getOutputs methods respectively will return nullptr. Some subclasses,
* like the #ramses::AppearanceBinding, will have their inputs depending on their
* current state (in this example the GLSL uniforms of the shader to which the bound ramses
* Appearance belongs). In those cases, #getInputs()/#getOutputs() will return a #ramses::Property
* which represents an empty struct (type Struct, but no child properties).
+ * @ingroup LogicAPI
*/
class RAMSES_API LogicNode : public LogicObject
{
diff --git a/include/ramses/client/logic/LogicObject.h b/include/ramses/client/logic/LogicObject.h
index e3be921af..a468da222 100644
--- a/include/ramses/client/logic/LogicObject.h
+++ b/include/ramses/client/logic/LogicObject.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2021 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -19,7 +19,8 @@ namespace ramses::internal
namespace ramses
{
/**
- * A base class for all rlogic API objects
+ * A base class for all rlogic API objects.
+ * @ingroup LogicAPI
*/
class RAMSES_API LogicObject : public SceneObject
{
diff --git a/include/ramses/client/logic/LuaConfig.h b/include/ramses/client/logic/LuaConfig.h
index 0ecac1625..e147b58c5 100644
--- a/include/ramses/client/logic/LuaConfig.h
+++ b/include/ramses/client/logic/LuaConfig.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2021 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -26,6 +26,7 @@ namespace ramses
/**
* Holds configuration settings for Lua script and module creation. Can be default-constructed, moved
* and copied.
+ * @ingroup LogicAPI
*/
class RAMSES_API LuaConfig
{
diff --git a/include/ramses/client/logic/LuaInterface.h b/include/ramses/client/logic/LuaInterface.h
index c62d15b0b..58975d899 100644
--- a/include/ramses/client/logic/LuaInterface.h
+++ b/include/ramses/client/logic/LuaInterface.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2022 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -24,7 +24,7 @@ namespace ramses
class Property;
/**
- * LuaInterface encapsulates forms an additional layer to a logic network (whole or its parts) and it exposes only relevant
+ * #LuaInterface encapsulates a logic network (whole or its parts) and forms an additional layer to expose only relevant
* inputs to the user of that network. Those input variables can be used to represent scenes in an abstract way.
* LuaInterface instances are created by the #ramses::LogicEngine class.
*
@@ -33,11 +33,12 @@ namespace ramses
* - A Lua interface contains only one global function: interface()
* - The interface() function takes only one parameter that represents both inputs and outputs, e.g., interface(INOUT_PARAMS)
*
- * Violating any of these requirements will result in error, which can be obtained by calling #ramses::RamsesFramework::getLastError().
+ * Violating any of these requirements will result in an error, which can be obtained by calling #ramses::RamsesFramework::getLastError().
* For other than interface definition purposes, see #ramses::LuaModule and #ramses::LuaScript for details.
*
* See also the full documentation at https://ramses-logic.readthedocs.io/en/latest/api.html for more details on Lua and
* its interaction with C++.
+ * @ingroup LogicAPI
*/
class RAMSES_API LuaInterface : public LogicNode
{
diff --git a/include/ramses/client/logic/LuaModule.h b/include/ramses/client/logic/LuaModule.h
index aa649520d..7b9dc7a04 100644
--- a/include/ramses/client/logic/LuaModule.h
+++ b/include/ramses/client/logic/LuaModule.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2021 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,7 +20,7 @@ namespace ramses
/**
* #LuaModule represents Lua source code in form of a reusable Lua module
* which can be used in Lua scripts of one or more #ramses::LuaScript instances. Lua modules can
- * be also declared as dependency to other modules.
+ * be also declared as a dependency to other modules.
* Lua modules are expected to follow these guidelines https://www.tutorialspoint.com/lua/lua_modules.htm
* and have some limitations:
* - the name of the module given when creating it is only used to differentiate between #LuaModule
@@ -32,7 +32,7 @@ namespace ramses
* #ramses::LuaModule source code is loaded into its own Lua environment and is accessible in other #ramses::LuaScript
* and/or #LuaModule instances in their own environments under the alias name given when creating those.
*
- * #LuaModule can also be used to help provide property types for #ramses::LuaScript interface declarations,
+ * #LuaModule can also be used to help providing property types for #ramses::LuaScript interface declarations,
* for example a module with a 'struct' type:
* \code{.lua}
* local mytypes = {}
@@ -57,6 +57,7 @@ namespace ramses
* \endcode
*
* The label 'Type' is a reserved keyword and must not be overwritten for other purposes (e.g. name of variable or function).
+ * @ingroup LogicAPI
*/
class RAMSES_API LuaModule : public LogicObject
{
diff --git a/include/ramses/client/logic/LuaScript.h b/include/ramses/client/logic/LuaScript.h
index 5382df439..06de2015b 100644
--- a/include/ramses/client/logic/LuaScript.h
+++ b/include/ramses/client/logic/LuaScript.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -27,8 +27,8 @@ namespace ramses
/**
* The LuaScript class is the cornerstone of RAMSES Logic as it encapsulates
- * a Lua script and the associated with it Lua environment. LuaScript instances are created
- * by the #ramses::LogicEngine class.
+ * a Lua script and the Lua environment associated with it. LuaScript instances are created
+ * by #ramses::LogicEngine class.
*
* A LuaScript can be created from Lua source code which must fulfill following requirements:
*
@@ -64,10 +64,11 @@ namespace ramses
* - the string provided will be the name under which the module will be available in other functions
* - See also #ramses::LuaModule for more info on modules and their syntax
*
- * Violating any of these requirements will result in error, which can be obtained by calling #ramses::RamsesFramework::getLastError().
+ * Violating any of these requirements will result in an error, which can be obtained by calling #ramses::RamsesFramework::getLastError().
*
* See also the full documentation at https://ramses-logic.readthedocs.io/en/latest/api.html for more details on Lua and
* its interaction with C++.
+ * @ingroup LogicAPI
*/
class RAMSES_API LuaScript : public LogicNode
{
diff --git a/include/ramses/client/logic/MeshNodeBinding.h b/include/ramses/client/logic/MeshNodeBinding.h
index ad89fa8a9..466ec95b1 100644
--- a/include/ramses/client/logic/MeshNodeBinding.h
+++ b/include/ramses/client/logic/MeshNodeBinding.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2022 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -25,7 +25,7 @@ namespace ramses
{
/**
* The #MeshNodeBinding binds to a Ramses object instance of ramses::MeshNode and exposes a set of input properties
- * allowing to control certain states the MeshNode.
+ * allowing to control certain states of the MeshNode.
*
* #MeshNodeBinding has these input properties:
* 'vertexOffset' (type int32)
@@ -45,6 +45,7 @@ namespace ramses
* The changes via binding objects are applied to the bound object right away when calling ramses::LogicEngine::update(),
* however keep in mind that Ramses has a mechanism for bundling scene changes and applying them at once using ramses::Scene::flush,
* so the changes will be applied all the way only after calling this method on the scene.
+ * @ingroup LogicAPI
*/
class RAMSES_API MeshNodeBinding : public RamsesBinding
{
diff --git a/include/ramses/client/logic/NodeBinding.h b/include/ramses/client/logic/NodeBinding.h
index 2e4c36b84..56fd21404 100644
--- a/include/ramses/client/logic/NodeBinding.h
+++ b/include/ramses/client/logic/NodeBinding.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -46,7 +46,7 @@ namespace ramses
* regardless of the 'visibility' input.
*
* The default values of the input properties are taken from the bound ramses::Node provided during construction.
- * This also applies for rotations, if the ramses::ERotationType values of the
+ * This also applies to rotations, if the ramses::ERotationType values of the
* ramses node match (both are either Quaternion or Euler with the same axis ordering). Otherwise a warning is
* issued and the rotation values are set to 0.
*
@@ -65,6 +65,7 @@ namespace ramses
* The changes via binding objects are applied to the bound object right away when calling ramses::LogicEngine::update(),
* however keep in mind that Ramses has a mechanism for bundling scene changes and applying them at once using ramses::Scene::flush,
* so the changes will be applied all the way only after calling this method on the scene.
+ * @ingroup LogicAPI
*/
class RAMSES_API NodeBinding : public RamsesBinding
{
diff --git a/include/ramses/client/logic/Property.h b/include/ramses/client/logic/Property.h
index 026bd5bcb..1c78ded59 100644
--- a/include/ramses/client/logic/Property.h
+++ b/include/ramses/client/logic/Property.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -31,6 +31,7 @@ namespace ramses
* Properties can have primitive types (string, integer, etc.) or complex types (structs, arrays).
* Complex types can have "children", i.e. nested properties: named fields (structs), or indexed
* fields (arrays).
+ * @ingroup LogicAPI
*/
class RAMSES_API Property
{
diff --git a/include/ramses/client/logic/RamsesBinding.h b/include/ramses/client/logic/RamsesBinding.h
index a73a42b20..63b87ab26 100644
--- a/include/ramses/client/logic/RamsesBinding.h
+++ b/include/ramses/client/logic/RamsesBinding.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -18,8 +18,9 @@ namespace ramses::internal
namespace ramses
{
/**
- * The RamsesBinding is a shared base class for bindings to Ramses objects.
+ * #RamsesBinding is a shared base class for bindings to Ramses objects.
* For details on each type of binding, look at the derived classes.
+ * @ingroup LogicAPI
*/
class RAMSES_API RamsesBinding : public LogicNode
{
diff --git a/include/ramses/client/logic/RenderBufferBinding.h b/include/ramses/client/logic/RenderBufferBinding.h
index 1d5c7e678..7558cd0ac 100644
--- a/include/ramses/client/logic/RenderBufferBinding.h
+++ b/include/ramses/client/logic/RenderBufferBinding.h
@@ -24,8 +24,8 @@ namespace ramses::internal
namespace ramses
{
/**
- * The #RenderBufferBinding binds to a Ramses object instance of #ramses::RenderBuffer and exposes a set of input properties
- * allowing to change some parameters of the #ramses::RenderBuffer.
+ * #RenderBufferBinding binds to a Ramses object instance of #ramses::RenderBuffer and exposes a set of input properties
+ * allowing to change some parameters of #ramses::RenderBuffer.
*
* Important note: #ramses::RenderBuffer (unlike most other scene objects that can be bound to logic node network) is a static object
* in the sense that once it is allocated on Ramses renderer side it cannot be changed. This means that #RenderBufferBinding can be
@@ -60,6 +60,7 @@ namespace ramses
* in that render target
* - if #ramses::RenderBuffer is used as source/destination in a #ramses::BlitPass and becomes out of bounds for the pass's blitting region
* - renderer will produce an error log if a #ramses::RenderBuffer change comes after it was already allocated (see above for details)
+ * @ingroup LogicAPI
*/
class RAMSES_API RenderBufferBinding : public RamsesBinding
{
diff --git a/include/ramses/client/logic/RenderGroupBinding.h b/include/ramses/client/logic/RenderGroupBinding.h
index 9e1ce289f..ad1da56d0 100644
--- a/include/ramses/client/logic/RenderGroupBinding.h
+++ b/include/ramses/client/logic/RenderGroupBinding.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2022 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -24,8 +24,8 @@ namespace ramses::internal
namespace ramses
{
/**
- * The RenderGroupBinding binds to a Ramses object instance of ramses::RenderGroup.
- * RenderGroupBinding allows controlling the rendering order of selected elements
+ * #RenderGroupBinding binds to a Ramses object instance of ramses::RenderGroup.
+ * #RenderGroupBinding allows controlling the rendering order of selected elements
* contained in the ramses::RenderGroup - these can be ramses::MeshNode and other (nested) ramses::RenderGroup objects.
*
* #RenderGroupBinding is initialized with a ramses::RenderGroup and a set of elements to expose for render order
@@ -67,6 +67,7 @@ namespace ramses
* The changes via binding objects are applied to the bound object right away when calling ramses::LogicEngine::update(),
* however keep in mind that Ramses has a mechanism for bundling scene changes and applying them at once using ramses::Scene::flush,
* so the changes will be applied all the way only after calling this method on the scene.
+ * @ingroup LogicAPI
*/
class RAMSES_API RenderGroupBinding : public RamsesBinding
{
diff --git a/include/ramses/client/logic/RenderGroupBindingElements.h b/include/ramses/client/logic/RenderGroupBindingElements.h
index d664f1acb..27a5e8887 100644
--- a/include/ramses/client/logic/RenderGroupBindingElements.h
+++ b/include/ramses/client/logic/RenderGroupBindingElements.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2022 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -26,10 +26,12 @@ namespace ramses::internal
namespace ramses
{
/**
- * RenderGroupBindingElements is a helper class holding a set of references to elements to be provided when constructing #ramses::RenderGroupBinding.
+ * #RenderGroupBindingElements is a helper class holding a set of references to elements to be provided when constructing #ramses::RenderGroupBinding.
* These elements are either ramses::MeshNode or ramses::RenderGroup.
+ *
* Note that ramses::RenderGroup can contain other (nested) ramses::RenderGroup objects, in such case the parent ramses::RenderGroup corresponds
* to the #ramses::RenderGroupBinding to be created and the nested ramses::RenderGroup is the element provided here.
+ * @ingroup LogicAPI
*/
class RAMSES_API RenderGroupBindingElements
{
diff --git a/include/ramses/client/logic/RenderPassBinding.h b/include/ramses/client/logic/RenderPassBinding.h
index c9e8428df..b3dc8f38c 100644
--- a/include/ramses/client/logic/RenderPassBinding.h
+++ b/include/ramses/client/logic/RenderPassBinding.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2022 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -24,7 +24,7 @@ namespace ramses::internal
namespace ramses
{
/**
- * The RenderPassBinding binds to a Ramses object instance like other types derived from
+ * #RenderPassBinding binds to a Ramses object instance like other types derived from
* #ramses::RamsesBinding, in this case it binds to a ramses::RenderPass.
* RenderPassBinding can be created using #ramses::LogicEngine::createRenderPassBinding
* after providing an instance of a ramses::RenderPass.
@@ -52,6 +52,7 @@ namespace ramses
* The changes via binding objects are applied to the bound object right away when calling ramses::LogicEngine::update(),
* however keep in mind that Ramses has a mechanism for bundling scene changes and applying them at once using ramses::Scene::flush,
* so the changes will be applied all the way only after calling this method on the scene.
+ * @ingroup LogicAPI
*/
class RAMSES_API RenderPassBinding : public RamsesBinding
{
diff --git a/include/ramses/client/logic/SkinBinding.h b/include/ramses/client/logic/SkinBinding.h
index d0d2148d5..9b1dc9a7f 100644
--- a/include/ramses/client/logic/SkinBinding.h
+++ b/include/ramses/client/logic/SkinBinding.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2022 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -59,6 +59,7 @@ namespace ramses
* The changes via binding objects are applied to the bound objects right away when calling ramses::LogicEngine::update(),
* however keep in mind that Ramses has a mechanism for bundling scene changes and applying them at once using ramses::Scene::flush,
* so the changes will be applied all the way only after calling this method on the ramses scene.
+ * @ingroup LogicAPI
*/
class RAMSES_API SkinBinding : public RamsesBinding
{
diff --git a/include/ramses/client/logic/TimerNode.h b/include/ramses/client/logic/TimerNode.h
index f65cc6f74..3b7daac3c 100644
--- a/include/ramses/client/logic/TimerNode.h
+++ b/include/ramses/client/logic/TimerNode.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2021 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -36,6 +36,7 @@ namespace ramses
* time unit agnostic mode, see inputs/outputs description above for details.
* Note that unlike other logic nodes a TimerNode is always updated on every #ramses::LogicEngine::update call regardless of if any of its
* inputs were modified or not.
+ * @ingroup LogicAPI
*/
class RAMSES_API TimerNode : public LogicNode
{
diff --git a/include/ramses/client/text/FontRegistry.h b/include/ramses/client/text/FontRegistry.h
index 2a42ddc4b..4ff71449d 100644
--- a/include/ramses/client/text/FontRegistry.h
+++ b/include/ramses/client/text/FontRegistry.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2018 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -21,9 +21,9 @@ namespace ramses
}
/**
- * @ingroup TextAPI
* @brief Font registry can be used to load Freetype2 fonts and create font instances (optionally with Harfbuzz).
* These are owned and managed by FontRegistry.
+ * @ingroup TextAPI
*/
class RAMSES_API FontRegistry : public IFontAccessor
{
diff --git a/include/ramses/client/text/IFontAccessor.h b/include/ramses/client/text/IFontAccessor.h
index bb9183b80..fdd8d5658 100644
--- a/include/ramses/client/text/IFontAccessor.h
+++ b/include/ramses/client/text/IFontAccessor.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2018 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -15,13 +15,13 @@ namespace ramses
class IFontInstance;
/**
- * @ingroup TextAPI
* @brief Interface for getting font instances using font instance ids.
*
* This interface allows overriding the standard Freetype/Harfbuzz logic
* to create and access fonts and e.g. replace with other implementations,
* or just override behavior/settings. Can be also used to pre-load font
* instances and a predefined set of glyphs statically (or load from file).
+ * @ingroup TextAPI
*/
class RAMSES_API IFontAccessor
{
diff --git a/include/ramses/client/text/IFontInstance.h b/include/ramses/client/text/IFontInstance.h
index 6216af657..4dfc42de1 100644
--- a/include/ramses/client/text/IFontInstance.h
+++ b/include/ramses/client/text/IFontInstance.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2018 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -16,8 +16,8 @@
namespace ramses
{
/**
- * @ingroup TextAPI
* @brief Interface for font instance that can be used to query glyph metadata and bitmaps
+ * @ingroup TextAPI
*/
class RAMSES_API IFontInstance
{
diff --git a/include/ramses/client/text/TextCache.h b/include/ramses/client/text/TextCache.h
index a0e13c924..3a4233c34 100644
--- a/include/ramses/client/text/TextCache.h
+++ b/include/ramses/client/text/TextCache.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2018 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -24,7 +24,6 @@ namespace ramses
}
/**
- * @ingroup TextAPI
* @brief Stores text data - texture atlas, meshes, glyph bitmap data. It is a cache because the
* content can be re-generated when necessary, e.g. when cached glyphs take up too much memory.
*
@@ -83,6 +82,7 @@ namespace ramses
* Finally, the TextLine object holds pointers to the original vector of glyphs which were used to create it.
* Be careful to not tamper with it, as it is used when destroying the text line to obtain information which
* glyphs can be freed.
+ * @ingroup TextAPI
*/
class RAMSES_API TextCache
{
diff --git a/include/ramses/framework/IRamshCommand.h b/include/ramses/framework/IRamshCommand.h
index d62c4c284..e485f7c52 100644
--- a/include/ramses/framework/IRamshCommand.h
+++ b/include/ramses/framework/IRamshCommand.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2021 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -19,6 +19,7 @@ namespace ramses
*
* These commands can be registered with #ramses::RamsesFramework::addRamshCommand and will
* receive callbacks triggered via console input or DLT injection.
+ * @ingroup CoreAPI
*/
class RAMSES_API IRamshCommand
{
diff --git a/include/ramses/framework/IThreadWatchdogNotification.h b/include/ramses/framework/IThreadWatchdogNotification.h
index 82f475c90..2ff2b2e8d 100644
--- a/include/ramses/framework/IThreadWatchdogNotification.h
+++ b/include/ramses/framework/IThreadWatchdogNotification.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2016 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -26,11 +26,12 @@ namespace ramses
* Users can implement this callback to receive alive notifications about ramses threads.
*
* In order to receive alive notification of ramses threads, one must provide a pointer to
- * an implementation of this interface to RamsesFrameworkConfig::setWatchdogNotificationCallBack
+ * an implementation of this interface to RamsesFrameworkConfig::setWatchdogNotificationCallBack.
* Before calling notifyThread with a certain threadID a registerThread call for that id will
* be invoked. Before stopping notifications of a certain threadID the unregisterThread method will
* be invoked - therefore do not expect alive messages for a certain threadID after an unregisterThread
* call for that threadID.
+ * @ingroup CoreAPI
*/
class RAMSES_API IThreadWatchdogNotification
{
diff --git a/include/ramses/framework/RamsesFramework.h b/include/ramses/framework/RamsesFramework.h
index 8c250124d..54c6d6c05 100644
--- a/include/ramses/framework/RamsesFramework.h
+++ b/include/ramses/framework/RamsesFramework.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -34,6 +34,7 @@ namespace ramses
/**
* @brief Class representing ramses framework components that are needed
* to initialize an instance of ramses client and renderer.
+ * @ingroup CoreAPI
*/
class RAMSES_API RamsesFramework
{
diff --git a/include/ramses/framework/RamsesFrameworkConfig.h b/include/ramses/framework/RamsesFrameworkConfig.h
index f5f9afc23..93988752d 100644
--- a/include/ramses/framework/RamsesFrameworkConfig.h
+++ b/include/ramses/framework/RamsesFrameworkConfig.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2016 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -24,8 +24,8 @@ namespace ramses
}
/**
- * @brief The RamsesFrameworkConfig holds a set of parameters to be used
- * to initialize ramses.
+ * @brief RamsesFrameworkConfig holds a set of parameters to be used to initialize ramses.
+ * @ingroup CoreAPI
*/
class RAMSES_API RamsesFrameworkConfig
{
diff --git a/include/ramses/framework/RamsesObject.h b/include/ramses/framework/RamsesObject.h
index b0098ad22..6b39fcf77 100644
--- a/include/ramses/framework/RamsesObject.h
+++ b/include/ramses/framework/RamsesObject.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2014 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -23,8 +23,8 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief The RamsesObject is a base class for all client API objects owned by the framework.
+ * @ingroup CoreAPI
*/
class RAMSES_API RamsesObject
{
diff --git a/include/ramses/framework/ValidationReport.h b/include/ramses/framework/ValidationReport.h
index abb43f7a2..41e558357 100644
--- a/include/ramses/framework/ValidationReport.h
+++ b/include/ramses/framework/ValidationReport.h
@@ -21,10 +21,10 @@ namespace ramses
}
/**
- * @ingroup CoreAPI
* @brief ValidationReport contains a list of issues that is reported by #ramses::RamsesObject::validate().
*
* @see #ramses::RamsesObject::validate()
+ * @ingroup CoreAPI
*/
class RAMSES_API ValidationReport
{
diff --git a/include/ramses/renderer/BinaryShaderCache.h b/include/ramses/renderer/BinaryShaderCache.h
index e3e77d478..bded0349e 100644
--- a/include/ramses/renderer/BinaryShaderCache.h
+++ b/include/ramses/renderer/BinaryShaderCache.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2016 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,9 +20,9 @@ namespace ramses
}
/**
- * @ingroup RendererAPI
* @brief Provide default implementation for IBinaryShaderCache interface, to be used in RamsesRenderer by setting in RendererConfig.
* Also provides functions to serialize binary shaders to file and deserialize binary shaders from file.
+ * @ingroup RendererAPI
*/
class RAMSES_API BinaryShaderCache : public IBinaryShaderCache
{
diff --git a/include/ramses/renderer/DisplayConfig.h b/include/ramses/renderer/DisplayConfig.h
index e3e7bff7c..cd71aea40 100644
--- a/include/ramses/renderer/DisplayConfig.h
+++ b/include/ramses/renderer/DisplayConfig.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,8 +22,8 @@ namespace ramses
class ValidationReport;
/**
+ * @brief DisplayConfig holds a set of parameters to be used to initialize a display.
* @ingroup RendererAPI
- * @brief The DisplayConfig holds a set of parameters to be used to initialize a display.
*/
class RAMSES_API DisplayConfig
{
diff --git a/include/ramses/renderer/IBinaryShaderCache.h b/include/ramses/renderer/IBinaryShaderCache.h
index ad63570fc..e0c200f5c 100644
--- a/include/ramses/renderer/IBinaryShaderCache.h
+++ b/include/ramses/renderer/IBinaryShaderCache.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -14,7 +14,6 @@
namespace ramses
{
/**
- * @ingroup RendererAPI
* @brief An interface used to exchange Binary Shader Cache with the RamsesRenderer. The RamsesRenderer will not
* delete this class, it is owned by the application.
*
@@ -67,6 +66,7 @@ namespace ramses
* | | | glProgramBinary(C, F, data) |
* | | |----------------------------->|
*
+ * @ingroup RendererAPI
*/
class RAMSES_API IBinaryShaderCache
{
diff --git a/include/ramses/renderer/IRendererEventHandler.h b/include/ramses/renderer/IRendererEventHandler.h
index f7cf82c86..0a1f781d2 100644
--- a/include/ramses/renderer/IRendererEventHandler.h
+++ b/include/ramses/renderer/IRendererEventHandler.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -166,6 +166,7 @@ namespace ramses
/**
* @brief Convenience empty implementation of IRendererEventHandler that can be used to derive from
* when only subset of event handling methods need to be implemented.
+ * @ingroup RendererAPI
*/
class RAMSES_API RendererEventHandlerEmpty : public IRendererEventHandler
{
diff --git a/include/ramses/renderer/IRendererSceneControlEventHandler.h b/include/ramses/renderer/IRendererSceneControlEventHandler.h
index e36ca1d97..aa09d4e9f 100644
--- a/include/ramses/renderer/IRendererSceneControlEventHandler.h
+++ b/include/ramses/renderer/IRendererSceneControlEventHandler.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -220,6 +220,7 @@ namespace ramses
/**
* @brief Convenience empty implementation of IRendererSceneControlEventHandler that can be used to derive from
* when only subset of event handling methods need to be implemented.
+ * @ingroup RendererAPI
*/
class RAMSES_API RendererSceneControlEventHandlerEmpty : public IRendererSceneControlEventHandler
{
diff --git a/include/ramses/renderer/RamsesRenderer.h b/include/ramses/renderer/RamsesRenderer.h
index c6e5c59be..8af8e96a8 100644
--- a/include/ramses/renderer/RamsesRenderer.h
+++ b/include/ramses/renderer/RamsesRenderer.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2015 BMW Car IT GmbH
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -35,7 +35,6 @@ namespace ramses
/**
* @brief RamsesRenderer is the main renderer component which provides API to configure
* and control the way content will be rendered on display(s).
- * @ingroup RendererAPI
* @details All the commands in this class are put to a queue and submitted only when #ramses::RamsesRenderer::flush is called,
* they are then executed asynchronously in the renderer core, the order of execution is preserved.
* Most of the commands have a corresponding callback which reports the result back to the caller
@@ -43,6 +42,7 @@ namespace ramses
* Some commands can fail immediately by returning false, in such case there will be no callback,
* because the command will not even be submitted.
* #ramses::RamsesRenderer API is not thread-safe.
+ * @ingroup RendererAPI
*/
class RAMSES_API RamsesRenderer
{
diff --git a/include/ramses/renderer/RendererSceneControl.h b/include/ramses/renderer/RendererSceneControl.h
index 4e7dd129f..e11b29a9b 100644
--- a/include/ramses/renderer/RendererSceneControl.h
+++ b/include/ramses/renderer/RendererSceneControl.h
@@ -1,5 +1,5 @@
// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
+// Copyright (C) 2023 BMW AG
// -------------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -24,8 +24,7 @@ namespace ramses
class IRendererSceneControlEventHandler;
/**
- * @brief Control states of scenes
- * @ingroup RendererAPI
+ * @brief RendererSceneControl controls the states of scenes.
* @details Where #ramses::RamsesRenderer is used to configure general rendering (create displays, control looping and other
* global rendering states), RendererSceneControl is used to configure which content should be rendered and where.
* Scenes can be assigned to display buffers, shown, hidden, data linked, etc.
@@ -35,6 +34,7 @@ namespace ramses
* via #dispatchEvents.
* Some commands can fail immediately by returning false, in such case there will be no callback,
* because the command will not even be submitted.
+ * @ingroup RendererAPI
*/
class RAMSES_API RendererSceneControl
{
diff --git a/scripts/ci/build/test-cmake-configurations.py b/scripts/ci/build/test-cmake-configurations.py
index 8027d8c1b..c16211aad 100755
--- a/scripts/ci/build/test-cmake-configurations.py
+++ b/scripts/ci/build/test-cmake-configurations.py
@@ -129,6 +129,9 @@ def check_expectations(condition, *expectations):
# step 3: build list of expected tests based on cmake options
expected_tests = ['ramses-framework-test_UNITTEST', 'ramses-client-test_UNITTEST']
+ if full_shared_lib:
+ expected_tests += ['ramses-shared-lib-tests_RNDSANDWICHTEST_SWRAST']
+
if examples and logic:
expected_tests += [
'00_minimal_UNITTEST',
diff --git a/scripts/ci/config/clang-tidy-wrapper.yaml b/scripts/ci/config/clang-tidy-wrapper.yaml
index 629d39ce6..1a3c1f77e 100644
--- a/scripts/ci/config/clang-tidy-wrapper.yaml
+++ b/scripts/ci/config/clang-tidy-wrapper.yaml
@@ -38,7 +38,7 @@ check-filter:
- check: cppcoreguidelines-pro-type-vararg
exclude:
# ImGui uses va_args in its api
- - ^tools/ramses-viewer/SceneViewerGui.cpp$
+ - ^tools/ramses-viewer/.*Gui.cpp$
- ^tools/ramses-imgui/src/ImguiWidgets.cpp$
- check: hicpp-signed-bitwise
exclude:
diff --git a/scripts/ci/config/sanitizer/lsan_suppressions.txt b/scripts/ci/config/sanitizer/lsan_suppressions.txt
index 6558c2416..8b3bea1b8 100644
--- a/scripts/ci/config/sanitizer/lsan_suppressions.txt
+++ b/scripts/ci/config/sanitizer/lsan_suppressions.txt
@@ -8,3 +8,4 @@ leak:calloc
leak:embedded-compositing-rendering-tests
leak:render-backend-tests
leak:renderer-lifecycle-tests
+leak:ramses-shared-lib-tests
diff --git a/scripts/ci/installation-check/check-installation.py b/scripts/ci/installation-check/check-installation.py
index 7787ad36e..e12f00e96 100755
--- a/scripts/ci/installation-check/check-installation.py
+++ b/scripts/ci/installation-check/check-installation.py
@@ -97,6 +97,7 @@ def main():
r"^bin/render-backend-tests$",
r"^bin/rendering-tests$",
r"^bin/renderer-lifecycle-tests$",
+ r"^bin/ramses-shared-lib-tests$",
]
# Everything else below should also not be in the package
diff --git a/src/framework/internal/Core/Utils/RamsesLogger.cpp b/src/framework/internal/Core/Utils/RamsesLogger.cpp
index cbd5bad8b..87ced75e2 100644
--- a/src/framework/internal/Core/Utils/RamsesLogger.cpp
+++ b/src/framework/internal/Core/Utils/RamsesLogger.cpp
@@ -96,7 +96,7 @@ namespace ramses::internal
{
std::vector logContextPtrs;
for (auto& ctx : m_logContexts)
- logContextPtrs.push_back(ctx.get());
+ logContextPtrs.push_back(ctx.second.get());
DltAdapter* dltAdapter = DltAdapter::getDltAdapter();
if (dltAdapter->initialize(config.dltAppId, config.dltAppDescription, enableDLTApplicationRegistration,
[this](const std::string& contextId_, int logLevel_) {
@@ -158,8 +158,9 @@ namespace ramses::internal
std::vector RamsesLogger::getAllContextsInformation() const
{
std::vector result;
- for (const auto& ctx : m_logContexts)
+ for (const auto& it : m_logContexts)
{
+ const auto& ctx = it.second;
result.push_back({ ctx->getContextId(), ctx->getContextName(), ctx->getLogLevel() });
}
return result;
@@ -169,7 +170,7 @@ namespace ramses::internal
{
for (auto& ctx : m_logContexts)
{
- ctx->setLogLevel(logLevel);
+ ctx.second->setLogLevel(logLevel);
}
}
@@ -237,9 +238,8 @@ namespace ramses::internal
LOG_ERROR(CONTEXT_FRAMEWORK, "RamsesLogger::createContext: Context creation not allowed after initialize");
assert(false);
}
- m_logContexts.push_back(std::make_unique(name, id));
-
- return *m_logContexts.back();
+ auto ins = m_logContexts.insert({ id, std::make_unique(name, id) });
+ return *(ins.first->second);
}
void RamsesLogger::dltLogLevelChangeCallback(const std::string& contextId, int logLevelAsInt)
@@ -268,11 +268,9 @@ namespace ramses::internal
LogContext* RamsesLogger::getLogContextById(const std::string& contextId)
{
- for (const auto& ctx : m_logContexts)
- {
- if (contextId == ctx->getContextId())
- return ctx.get();
- }
+ auto it = m_logContexts.find(contextId);
+ if (it != m_logContexts.end())
+ return it->second.get();
return nullptr;
}
diff --git a/src/framework/internal/Core/Utils/RamsesLogger.h b/src/framework/internal/Core/Utils/RamsesLogger.h
index 0cfe756f4..c1d9f7143 100644
--- a/src/framework/internal/Core/Utils/RamsesLogger.h
+++ b/src/framework/internal/Core/Utils/RamsesLogger.h
@@ -100,7 +100,7 @@ namespace ramses::internal
std::unique_ptr m_dltLogAppender;
std::unique_ptr m_platformLogAppender;
std::unique_ptr m_userLogAppender;
- std::vector> m_logContexts;
+ std::map> m_logContexts;
std::vector m_logAppenders;
LogContext& m_fileTransferContext;
};
diff --git a/src/renderer/internal/RendererLib/RendererCachedScene.cpp b/src/renderer/internal/RendererLib/RendererCachedScene.cpp
index 831b627c9..a72edd54f 100644
--- a/src/renderer/internal/RendererLib/RendererCachedScene.cpp
+++ b/src/renderer/internal/RendererLib/RendererCachedScene.cpp
@@ -91,6 +91,12 @@ namespace ramses::internal
return resultHandle;
}
+ void RendererCachedScene::releaseTextureBuffer(TextureBufferHandle handle)
+ {
+ TextureLinkCachedScene::releaseTextureBuffer(handle);
+ m_textureBufferUpdates[handle.asMemoryHandle()].clear();
+ }
+
void RendererCachedScene::updateTextureBuffer(TextureBufferHandle handle, uint32_t mipLevel, uint32_t x, uint32_t y, uint32_t width, uint32_t height, const std::byte* data)
{
TextureLinkCachedScene::updateTextureBuffer(handle, mipLevel, x, y, width, height, data);
diff --git a/src/renderer/internal/RendererLib/RendererCachedScene.h b/src/renderer/internal/RendererLib/RendererCachedScene.h
index e0008aa9c..315e46fd1 100644
--- a/src/renderer/internal/RendererLib/RendererCachedScene.h
+++ b/src/renderer/internal/RendererLib/RendererCachedScene.h
@@ -68,6 +68,7 @@ namespace ramses::internal
void setBlitPassEnabled(BlitPassHandle passHandle, bool isEnabled) override;
TextureBufferHandle allocateTextureBuffer (EPixelStorageFormat textureFormat, const MipMapDimensions& mipMapDimensions, TextureBufferHandle handle) override;
+ void releaseTextureBuffer(TextureBufferHandle handle) override;
void updateTextureBuffer (TextureBufferHandle handle, uint32_t mipLevel, uint32_t x, uint32_t y, uint32_t width, uint32_t height, const std::byte* data) override;
const RenderingPassInfoVector& getSortedRenderingPasses () const;
diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt
index 3ba6658fe..e1a7d5c88 100644
--- a/tests/integration/CMakeLists.txt
+++ b/tests/integration/CMakeLists.txt
@@ -12,6 +12,9 @@ add_subdirectory(renderer-tests)
add_subdirectory(smoke-tests)
add_subdirectory(resource-stress-tests)
add_subdirectory(render-backend-tests)
+if(ramses-sdk_BUILD_FULL_SHARED_LIB)
+ add_subdirectory(shared-lib-tests)
+endif()
if(ramses-sdk_ENABLE_LOGIC AND ramses-sdk_USE_IMAGEMAGICK)
add_subdirectory(viewer-tests)
diff --git a/tests/integration/renderer-tests/rendering-tests/TextureRenderingTests.cpp b/tests/integration/renderer-tests/rendering-tests/TextureRenderingTests.cpp
index 8770063dc..c24b03f34 100644
--- a/tests/integration/renderer-tests/rendering-tests/TextureRenderingTests.cpp
+++ b/tests/integration/renderer-tests/rendering-tests/TextureRenderingTests.cpp
@@ -81,6 +81,7 @@ namespace ramses::internal
testFramework.createTestCaseWithDefaultDisplay(TextureBufferTest_PartialUpdateMipMap, *this, "TextureBufferTest_PartialUpdateMipMap");
testFramework.createTestCaseWithDefaultDisplay(TextureBufferTest_PartialUpdateMipMap_RG8, *this, "TextureBufferTest_PartialUpdateMipMap_RG8");
testFramework.createTestCaseWithDefaultDisplay(TextureBufferTest_PartialUpdateIncremental, *this, "TextureBufferTest_PartialUpdateIncremental");
+ testFramework.createTestCaseWithDefaultDisplay(TextureBufferTest_Recreate, *this, "TextureBufferTest_Recreate");
testFramework.createTestCaseWithDefaultDisplay(TextureBufferTest_SwitchSceneTextureToClientTexture, *this, "TextureBufferTest_SwitchSceneTextureToClientTexture");
testFramework.createTestCaseWithDefaultDisplay(TextureBufferTest_SwitchClientTextureToSceneTexture, *this, "TextureBufferTest_SwitchClientTextureToSceneTexture");
testFramework.createTestCaseWithDefaultDisplay(TextureBufferTest_SwitchClientTextureToSceneTextureAndBack, *this, "TextureBufferTest_SwitchClientTextureToSceneTextureAndBack");
@@ -203,6 +204,14 @@ namespace ramses::internal
const auto update2 = testFramework.renderAndCompareScreenshot("TextureBuffer_PartialUpdate2", 0u);
return init && update1 && update2;
}
+ case TextureBufferTest_Recreate:
+ {
+ const auto sceneId = createAndShowScene(testFramework, TextureBufferScene::EState_UpdateAndRecreate);
+ testFramework.flushRendererAndDoOneLoop();
+ testFramework.getScenesRegistry().setSceneState(sceneId, TextureBufferScene::EState_UpdateAndRecreate1);
+ const auto update = testFramework.renderAndCompareScreenshot("TextureBuffer_Recreate", 0u);
+ return update;
+ }
case TextureBufferTest_SwitchSceneTextureToClientTexture:
{
const ramses::sceneId_t sceneId = createAndShowScene(testFramework, TextureBufferScene::EState_RGBA8_OneMip);
diff --git a/tests/integration/renderer-tests/rendering-tests/TextureRenderingTests.h b/tests/integration/renderer-tests/rendering-tests/TextureRenderingTests.h
index 596378630..e9e873900 100644
--- a/tests/integration/renderer-tests/rendering-tests/TextureRenderingTests.h
+++ b/tests/integration/renderer-tests/rendering-tests/TextureRenderingTests.h
@@ -80,6 +80,7 @@ namespace ramses::internal
TextureBufferTest_PartialUpdateMipMap,
TextureBufferTest_PartialUpdateMipMap_RG8,
TextureBufferTest_PartialUpdateIncremental,
+ TextureBufferTest_Recreate,
TextureBufferTest_SwitchSceneTextureToClientTexture,
TextureBufferTest_SwitchClientTextureToSceneTexture,
TextureBufferTest_SwitchClientTextureToSceneTextureAndBack,
diff --git a/tests/integration/renderer-tests/res/TextureBuffer_Recreate.PNG b/tests/integration/renderer-tests/res/TextureBuffer_Recreate.PNG
new file mode 100644
index 000000000..7641a8a37
Binary files /dev/null and b/tests/integration/renderer-tests/res/TextureBuffer_Recreate.PNG differ
diff --git a/tests/integration/shared-lib-tests/CMakeLists.txt b/tests/integration/shared-lib-tests/CMakeLists.txt
new file mode 100644
index 000000000..a5242512a
--- /dev/null
+++ b/tests/integration/shared-lib-tests/CMakeLists.txt
@@ -0,0 +1,27 @@
+# -------------------------------------------------------------------------
+# Copyright (C) 2023 BMW AG
+# -------------------------------------------------------------------------
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at https://mozilla.org/MPL/2.0/.
+# -------------------------------------------------------------------------
+
+createModule(
+ NAME ramses-shared-lib-tests
+ TYPE BINARY
+ ENABLE_INSTALL ${ramses-sdk_ENABLE_INSTALL}
+ INCLUDE_PATHS ${PROJECT_SOURCE_DIR}/tests/unittests/client/logic/shared
+ SRC_FILES LoggerTest.cpp
+ RendererEventGrabber.h
+ LogHandler.h
+ #RESOURCE_FOLDERS res
+
+ DEPENDENCIES ramses-shared-lib
+ ramses-gmock
+ ramses-gmock-main
+ fmt::fmt
+)
+
+MakeTestFromTarget(
+ TARGET ramses-shared-lib-tests
+ SUFFIX RNDSANDWICHTEST_SWRAST)
diff --git a/tests/integration/shared-lib-tests/LogHandler.h b/tests/integration/shared-lib-tests/LogHandler.h
new file mode 100644
index 000000000..3a2f00767
--- /dev/null
+++ b/tests/integration/shared-lib-tests/LogHandler.h
@@ -0,0 +1,62 @@
+// -------------------------------------------------------------------------
+// Copyright (C) 2023 BMW AG
+// -------------------------------------------------------------------------
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
+// -------------------------------------------------------------------------
+
+#pragma once
+
+#include "ramses/framework/RamsesFrameworkTypes.h"
+#include
+#include
+#include
+
+namespace ramses::internal
+{
+ class LogHandler
+ {
+ public:
+ void add(ELogLevel level, std::string_view context, std::string_view msg)
+ {
+ std::lock_guard guard(m_mutex);
+ m_log.push_back({level, std::string(context), std::string(msg)});
+ }
+
+ void clear()
+ {
+ std::lock_guard guard(m_mutex);
+ m_log.clear();
+ }
+
+ [[nodiscard]] size_t find(const std::string& token)
+ {
+ std::lock_guard guard(m_mutex);
+ size_t count = 0u;
+ for (const auto& entry : m_log)
+ {
+ if (entry.msg.find(token) != std::string::npos)
+ {
+ ++count;
+ }
+ }
+ return count;
+ }
+
+ [[nodiscard]] bool empty() const
+ {
+ return m_log.empty();
+ }
+
+ private:
+ struct LogEntry
+ {
+ ELogLevel level;
+ std::string context;
+ std::string msg;
+ };
+ std::mutex m_mutex;
+ std::list m_log;
+ };
+}
diff --git a/tests/integration/shared-lib-tests/LoggerTest.cpp b/tests/integration/shared-lib-tests/LoggerTest.cpp
new file mode 100644
index 000000000..966a3af82
--- /dev/null
+++ b/tests/integration/shared-lib-tests/LoggerTest.cpp
@@ -0,0 +1,89 @@
+// -------------------------------------------------------------------------
+// Copyright (C) 2023 BMW AG
+// -------------------------------------------------------------------------
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
+// -------------------------------------------------------------------------
+
+#include "gmock/gmock.h"
+#include "LogHandler.h"
+#include "RendererEventGrabber.h"
+#include "RamsesTestUtils.h"
+#include "ramses/framework/RamsesFramework.h"
+#include "ramses/client/ramses-client.h"
+#include "ramses/renderer/RamsesRenderer.h"
+#include "ramses/renderer/DisplayConfig.h"
+
+namespace ramses::internal
+{
+ class LoggerTestApp
+ {
+ public:
+ LoggerTestApp()
+ : LoggerTestApp(RamsesFrameworkConfig(EFeatureLevel_Latest))
+ {
+ }
+
+ explicit LoggerTestApp(const RamsesFrameworkConfig& config)
+ {
+ auto handler = [&](ELogLevel level, std::string_view context, std::string_view msg) { m_log.add(level, context, msg); };
+ RamsesFramework::SetLogHandler(handler);
+
+ RendererConfig rendererConfig;
+ DisplayConfig displayConfig;
+ m_framework = std::make_unique(config);
+ m_client = m_framework->createClient("defaultClient");
+ m_scene = m_client->createScene(ramses::sceneId_t(123));
+ m_renderer = m_framework->createRenderer(rendererConfig);
+
+ m_renderer->startThread();
+ m_eventCollector = std::make_unique(m_renderer);
+ m_display = m_renderer->createDisplay(displayConfig);
+ m_renderer->flush();
+ }
+
+ ~LoggerTestApp()
+ {
+ RamsesFramework::SetLogHandler(LogHandlerFunc());
+ }
+
+ std::unique_ptr m_framework;
+ RamsesClient* m_client;
+ Scene* m_scene;
+ RamsesRenderer* m_renderer;
+ displayId_t m_display;
+ std::unique_ptr m_eventCollector;
+ LogHandler m_log;
+ };
+
+ TEST(LoggerTest, DefaultLogging)
+ {
+ LoggerTestApp app;
+ ASSERT_TRUE(app.m_eventCollector->waitForDisplay(app.m_display));
+ EXPECT_FALSE(app.m_log.empty());
+ EXPECT_EQ(1, app.m_log.find("R.main: RamsesFramework::createRamsesClient"));
+ EXPECT_EQ(1, app.m_log.find("R.main: RamsesFramework::createRamsesRenderer"));
+ EXPECT_EQ(1, app.m_log.find("R.DispThrd0: - executing CreateDisplay"));
+ }
+
+ TEST(LoggerTest, DisabledRendererLogs)
+ {
+ RamsesFrameworkConfig cfg(EFeatureLevel_Latest);
+ cfg.setLogLevel("RRND", ELogLevel::Off);
+ LoggerTestApp app(cfg);
+ ASSERT_TRUE(app.m_eventCollector->waitForDisplay(app.m_display));
+ EXPECT_EQ(1, app.m_log.find("R.main: RamsesFramework::createRamsesClient"));
+ EXPECT_EQ(1, app.m_log.find("R.main: RamsesFramework::createRamsesRenderer"));
+ EXPECT_EQ(0, app.m_log.find("R.DispThrd0: - executing CreateDisplay"));
+ }
+
+ TEST(LoggerTest, DisabledLogs)
+ {
+ RamsesFrameworkConfig cfg(EFeatureLevel_Latest);
+ cfg.setLogLevel(ELogLevel::Error);
+ LoggerTestApp app(cfg);
+ ASSERT_TRUE(app.m_eventCollector->waitForDisplay(app.m_display));
+ EXPECT_TRUE(app.m_log.empty());
+ }
+}
diff --git a/tests/integration/shared-lib-tests/RendererEventGrabber.h b/tests/integration/shared-lib-tests/RendererEventGrabber.h
new file mode 100644
index 000000000..8deb96e0b
--- /dev/null
+++ b/tests/integration/shared-lib-tests/RendererEventGrabber.h
@@ -0,0 +1,86 @@
+// -------------------------------------------------------------------------
+// Copyright (C) 2023 BMW AG
+// -------------------------------------------------------------------------
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
+// -------------------------------------------------------------------------
+
+#pragma once
+
+#include "ramses/renderer/RamsesRenderer.h"
+#include "ramses/renderer/RendererSceneControl.h"
+#include "ramses/renderer/IRendererEventHandler.h"
+#include "ramses/renderer/IRendererSceneControlEventHandler.h"
+
+#include
+#include
+#include
+
+namespace ramses::internal
+{
+ class RendererEventGrabber : public ramses::RendererEventHandlerEmpty, public ramses::RendererSceneControlEventHandlerEmpty
+ {
+ public:
+ explicit RendererEventGrabber(RamsesRenderer* renderer)
+ : m_renderer(renderer)
+ {
+ }
+
+ void dispatchEvents()
+ {
+ m_renderer->dispatchEvents(*this);
+ m_renderer->getSceneControlAPI()->dispatchEvents(*this);
+ }
+
+ void displayCreated(ramses::displayId_t displayId, ramses::ERendererEventResult result) override
+ {
+ if (ramses::ERendererEventResult::Failed != result)
+ {
+ m_displays.insert(displayId);
+ }
+ else
+ {
+ m_isRunning = false;
+ }
+ }
+
+ void displayDestroyed(ramses::displayId_t displayId, ramses::ERendererEventResult result) override
+ {
+ if (ramses::ERendererEventResult::Failed != result)
+ {
+ m_displays.erase(displayId);
+ }
+ else
+ {
+ m_isRunning = false;
+ }
+ }
+
+ [[nodiscard]] bool waitForDisplay(ramses::displayId_t displayId)
+ {
+ return waitUntil([&] { return m_displays.find(displayId) != m_displays.end(); });
+ }
+
+ [[nodiscard]] bool waitUntil(const std::function& conditionFunction)
+ {
+ const std::chrono::steady_clock::time_point timeoutTS = std::chrono::steady_clock::now() + std::chrono::seconds{5};
+ while (m_isRunning && !conditionFunction() && std::chrono::steady_clock::now() < timeoutTS)
+ {
+ std::this_thread::sleep_for(std::chrono::milliseconds{5}); // will give the renderer time to process changes
+ m_renderer->dispatchEvents(*this);
+ auto* sceneControl = m_renderer->getSceneControlAPI();
+ sceneControl->dispatchEvents(*this);
+ }
+
+ return conditionFunction();
+ }
+
+ private:
+ using DisplaySet = std::unordered_set;
+
+ RamsesRenderer* m_renderer;
+ DisplaySet m_displays;
+ bool m_isRunning = true;
+ };
+}
diff --git a/tests/integration/test-content/TestScenes/TextureBufferScene.h b/tests/integration/test-content/TestScenes/TextureBufferScene.h
index 3a19ef96a..0012b5b6e 100644
--- a/tests/integration/test-content/TestScenes/TextureBufferScene.h
+++ b/tests/integration/test-content/TestScenes/TextureBufferScene.h
@@ -38,7 +38,9 @@ namespace ramses::internal
EState_PartialUpdateMipMap_RG8,
EState_ClientTextureResource_RGBA8,
EState_SwitchBackToClientTexture,
- EState_SwitchBackToExistingTextureBufferAndUpdate
+ EState_SwitchBackToExistingTextureBufferAndUpdate,
+ EState_UpdateAndRecreate,
+ EState_UpdateAndRecreate1,
};
void setState(uint32_t state);
diff --git a/tests/integration/test-content/TextureBufferScene.cpp b/tests/integration/test-content/TextureBufferScene.cpp
index c5c60ac56..9b8b949da 100644
--- a/tests/integration/test-content/TextureBufferScene.cpp
+++ b/tests/integration/test-content/TextureBufferScene.cpp
@@ -232,6 +232,21 @@ namespace ramses::internal
mipToFetch = 0;
break;
}
+ case EState_UpdateAndRecreate:
+ assert(m_textureBuffer == nullptr);
+ m_textureBuffer = m_scene.createTexture2DBuffer(ramses::ETextureFormat::RGBA8, 4u, 4u, 1);
+ sampler = m_scene.createTextureSampler(ramses::ETextureAddressMode::Clamp, ramses::ETextureAddressMode::Clamp, ramses::ETextureSamplingMethod::Nearest_MipMapNearest, ramses::ETextureSamplingMethod::Nearest, *m_textureBuffer);
+ mipToFetch = 0;
+ break;
+ case EState_UpdateAndRecreate1:
+ assert(m_textureBuffer != nullptr);
+ m_textureBuffer->updateData(0, 0, 0, 4, 4, rgba_4x4_blue.data());
+ m_scene.destroy(*m_textureBuffer);
+ m_textureBuffer = m_scene.createTexture2DBuffer(ramses::ETextureFormat::RGBA8, 2u, 2u, 1);
+ m_textureBuffer->updateData(0, 0, 0, 2, 2, rgba_2x2_yellow.data());
+ sampler = m_scene.createTextureSampler(ramses::ETextureAddressMode::Clamp, ramses::ETextureAddressMode::Clamp, ramses::ETextureSamplingMethod::Nearest_MipMapNearest, ramses::ETextureSamplingMethod::Nearest, *m_textureBuffer);
+ mipToFetch = 0;
+ break;
default:
assert(false);
}
diff --git a/tests/integration/viewer-tests/LogicViewerAppTest.cpp b/tests/integration/viewer-tests/LogicViewerAppTest.cpp
index a1e012028..e873a76e1 100644
--- a/tests/integration/viewer-tests/LogicViewerAppTest.cpp
+++ b/tests/integration/viewer-tests/LogicViewerAppTest.cpp
@@ -40,56 +40,56 @@
const auto defaultLuaFile = R"(function default()
--Interfaces
- rlogic.interfaces["myInterface"]["IN"]["paramFloat"].value = 0
+ R.logic[""].interfaces["myInterface"]["IN"]["paramFloat"].value = 0
--Scripts
- rlogic.scripts["allTypesScript"]["IN"]["paramBool"].value = false
- rlogic.scripts["allTypesScript"]["IN"]["paramFloat"].value = 0
- rlogic.scripts["allTypesScript"]["IN"]["paramInt32"].value = 0
- rlogic.scripts["allTypesScript"]["IN"]["paramInt64"].value = 0
- rlogic.scripts["allTypesScript"]["IN"]["paramString"].value = ''
- rlogic.scripts["allTypesScript"]["IN"]["paramVec2f"].value = { 0, 0 }
- rlogic.scripts["allTypesScript"]["IN"]["paramVec2i"].value = { 0, 0 }
- rlogic.scripts["allTypesScript"]["IN"]["paramVec3f"].value = { 0, 0, 0 }
- rlogic.scripts["allTypesScript"]["IN"]["paramVec3i"].value = { 0, 0, 0 }
- rlogic.scripts["allTypesScript"]["IN"]["paramVec4f"].value = { 0, 0, 0, 0 }
- rlogic.scripts["allTypesScript"]["IN"]["paramVec4i"].value = { 0, 0, 0, 0 }
- rlogic.scripts["allTypesScript"]["IN"]["struct"]["nested"]["data1"].value = ''
- rlogic.scripts["allTypesScript"]["IN"]["struct"]["nested"]["data2"].value = 0
+ R.logic[""].scripts["allTypesScript"]["IN"]["paramBool"].value = false
+ R.logic[""].scripts["allTypesScript"]["IN"]["paramFloat"].value = 0
+ R.logic[""].scripts["allTypesScript"]["IN"]["paramInt32"].value = 0
+ R.logic[""].scripts["allTypesScript"]["IN"]["paramInt64"].value = 0
+ R.logic[""].scripts["allTypesScript"]["IN"]["paramString"].value = ''
+ R.logic[""].scripts["allTypesScript"]["IN"]["paramVec2f"].value = { 0, 0 }
+ R.logic[""].scripts["allTypesScript"]["IN"]["paramVec2i"].value = { 0, 0 }
+ R.logic[""].scripts["allTypesScript"]["IN"]["paramVec3f"].value = { 0, 0, 0 }
+ R.logic[""].scripts["allTypesScript"]["IN"]["paramVec3i"].value = { 0, 0, 0 }
+ R.logic[""].scripts["allTypesScript"]["IN"]["paramVec4f"].value = { 0, 0, 0, 0 }
+ R.logic[""].scripts["allTypesScript"]["IN"]["paramVec4i"].value = { 0, 0, 0, 0 }
+ R.logic[""].scripts["allTypesScript"]["IN"]["struct"]["nested"]["data1"].value = ''
+ R.logic[""].scripts["allTypesScript"]["IN"]["struct"]["nested"]["data2"].value = 0
--Node bindings
- rlogic.nodeBindings["myNode"]["IN"]["visibility"].value = true
- rlogic.nodeBindings["myNode"]["IN"]["translation"].value = { 0, 0, 0 }
- rlogic.nodeBindings["myNode"]["IN"]["scaling"].value = { 1, 1, 1 }
- rlogic.nodeBindings["myNode"]["IN"]["enabled"].value = true
+ R.logic[""].nodeBindings["myNode"]["IN"]["visibility"].value = true
+ R.logic[""].nodeBindings["myNode"]["IN"]["translation"].value = { 0, 0, 0 }
+ R.logic[""].nodeBindings["myNode"]["IN"]["scaling"].value = { 1, 1, 1 }
+ R.logic[""].nodeBindings["myNode"]["IN"]["enabled"].value = true
--Appearance bindings
- rlogic.appearanceBindings["myAppearance"]["IN"]["green"].value = 0
- rlogic.appearanceBindings["myAppearance"]["IN"]["blue"].value = 0
+ R.logic[""].appearanceBindings["myAppearance"]["IN"]["green"].value = 0
+ R.logic[""].appearanceBindings["myAppearance"]["IN"]["blue"].value = 0
--Camera bindings
- rlogic.cameraBindings["myCamera"]["IN"]["viewport"]["offsetX"].value = 0
- rlogic.cameraBindings["myCamera"]["IN"]["viewport"]["offsetY"].value = 0
- rlogic.cameraBindings["myCamera"]["IN"]["viewport"]["width"].value = 800
- rlogic.cameraBindings["myCamera"]["IN"]["viewport"]["height"].value = 800
- rlogic.cameraBindings["myCamera"]["IN"]["frustum"]["nearPlane"].value = 0.1
- rlogic.cameraBindings["myCamera"]["IN"]["frustum"]["farPlane"].value = 100
- rlogic.cameraBindings["myCamera"]["IN"]["frustum"]["fieldOfView"].value = 20
- rlogic.cameraBindings["myCamera"]["IN"]["frustum"]["aspectRatio"].value = 1
+ R.logic[""].cameraBindings["myCamera"]["IN"]["viewport"]["offsetX"].value = 0
+ R.logic[""].cameraBindings["myCamera"]["IN"]["viewport"]["offsetY"].value = 0
+ R.logic[""].cameraBindings["myCamera"]["IN"]["viewport"]["width"].value = 800
+ R.logic[""].cameraBindings["myCamera"]["IN"]["viewport"]["height"].value = 800
+ R.logic[""].cameraBindings["myCamera"]["IN"]["frustum"]["nearPlane"].value = 0.1
+ R.logic[""].cameraBindings["myCamera"]["IN"]["frustum"]["farPlane"].value = 100
+ R.logic[""].cameraBindings["myCamera"]["IN"]["frustum"]["fieldOfView"].value = 20
+ R.logic[""].cameraBindings["myCamera"]["IN"]["frustum"]["aspectRatio"].value = 1
--RenderPass bindings
- rlogic.renderPassBindings["myRenderPass"]["IN"]["enabled"].value = true
- rlogic.renderPassBindings["myRenderPass"]["IN"]["renderOrder"].value = 0
- rlogic.renderPassBindings["myRenderPass"]["IN"]["clearColor"].value = { 0, 0, 0, 1 }
- rlogic.renderPassBindings["myRenderPass"]["IN"]["renderOnce"].value = false
+ R.logic[""].renderPassBindings["myRenderPass"]["IN"]["enabled"].value = true
+ R.logic[""].renderPassBindings["myRenderPass"]["IN"]["renderOrder"].value = 0
+ R.logic[""].renderPassBindings["myRenderPass"]["IN"]["clearColor"].value = { 0, 0, 0, 1 }
+ R.logic[""].renderPassBindings["myRenderPass"]["IN"]["renderOnce"].value = false
--RenderGroup bindings
- rlogic.renderGroupBindings["myRenderGroup"]["IN"]["renderOrders"]["myMeshNode"].value = 0
+ R.logic[""].renderGroupBindings["myRenderGroup"]["IN"]["renderOrders"]["myMeshNode"].value = 0
--MeshNode bindings
- rlogic.meshNodeBindings["myMeshNode"]["IN"]["vertexOffset"].value = 0
- rlogic.meshNodeBindings["myMeshNode"]["IN"]["indexOffset"].value = 0
- rlogic.meshNodeBindings["myMeshNode"]["IN"]["indexCount"].value = 3
- rlogic.meshNodeBindings["myMeshNode"]["IN"]["instanceCount"].value = 1
+ R.logic[""].meshNodeBindings["myMeshNode"]["IN"]["vertexOffset"].value = 0
+ R.logic[""].meshNodeBindings["myMeshNode"]["IN"]["indexOffset"].value = 0
+ R.logic[""].meshNodeBindings["myMeshNode"]["IN"]["indexCount"].value = 3
+ R.logic[""].meshNodeBindings["myMeshNode"]["IN"]["instanceCount"].value = 1
--Anchor points
--Skin bindings
--RenderBuffer bindings
- rlogic.renderBufferBindings["myRenderBuffer"]["IN"]["width"].value = 1
- rlogic.renderBufferBindings["myRenderBuffer"]["IN"]["height"].value = 2
- rlogic.renderBufferBindings["myRenderBuffer"]["IN"]["sampleCount"].value = 3
+ R.logic[""].renderBufferBindings["myRenderBuffer"]["IN"]["width"].value = 1
+ R.logic[""].renderBufferBindings["myRenderBuffer"]["IN"]["height"].value = 2
+ R.logic[""].renderBufferBindings["myRenderBuffer"]["IN"]["sampleCount"].value = 3
end
@@ -98,10 +98,11 @@ defaultView = {
description = "",
update = function(time_ms)
default()
- end
+ end,
+ inputs = {}
}
-rlogic.views = {defaultView}
+R.views = {defaultView}
-- sample test function for automated image base tests
-- can be executed by command line parameter --exec=test_default
@@ -109,7 +110,7 @@ function test_default()
-- modify properties
default()
-- stores a screenshot (relative to the working directory)
- rlogic.screenshot("test_default.png")
+ R.screenshot("test_default.png")
end
)";
@@ -233,6 +234,7 @@ namespace ramses::internal
void setupLogic()
{
LogicEngine& engine{ *m_scene.scene->createLogicEngine() };
+ m_logicId = engine.getSceneObjectId();
auto* interface = engine.createLuaInterface(R"(
function interface(IN,OUT)
@@ -426,11 +428,17 @@ namespace ramses::internal
return testing::AssertionSuccess();
}
+ LogicEngine* getLogic()
+ {
+ return m_app->getScene()->template findObject(m_logicId);
+ }
+
protected:
WithTempDirectory m_withTempDirectory;
RamsesTestSetup m_ramses;
TriangleTestScene m_scene = m_ramses.createTriangleTestScene(ramses::sceneId_t(1));
Scene* m_emptyScene = m_ramses.createScene(ramses::sceneId_t(2));
+ sceneObjectId_t m_logicId;
LogHandler m_log;
std::unique_ptr m_cli;
std::unique_ptr m_app;
@@ -592,11 +600,39 @@ namespace ramses::internal
EXPECT_THAT(testing::internal::GetCapturedStderr(), testing::HasSubstr("File does not exist: notExisting.lua"));
}
+ TYPED_TEST(ALogicViewerApp_T, writeLuaSimplified)
+ {
+ EXPECT_EQ(0, this->createApp({ "--write-config", ramsesFile }));
+ EXPECT_FALSE(this->m_app->getSettings()->luaPreferSimplified);
+ this->m_app->getSettings()->luaPreferSimplified = true;
+ EXPECT_EQ(ViewerApp::ExitCode::Ok, this->m_app->run());
+ EXPECT_EQ(Result(), this->m_app->getLogicViewer()->loadLuaFile(luaFile));
+ }
+
+ TYPED_TEST(ALogicViewerApp_T, writeLuaNotSimplifiedIdentifiers)
+ {
+ EXPECT_EQ(0, this->createApp({ "--write-config", ramsesFile }));
+ EXPECT_FALSE(this->m_app->getSettings()->luaPreferIdentifiers);
+ this->m_app->getSettings()->luaPreferIdentifiers = true;
+ EXPECT_EQ(ViewerApp::ExitCode::Ok, this->m_app->run());
+ EXPECT_EQ(Result(), this->m_app->getLogicViewer()->loadLuaFile(luaFile));
+ }
+
+ TYPED_TEST(ALogicViewerApp_T, writeLuaNotSimplifiedObjectIds)
+ {
+ EXPECT_EQ(0, this->createApp({ "--write-config", ramsesFile }));
+ EXPECT_FALSE(this->m_app->getSettings()->luaPreferObjectIds);
+ this->m_app->getSettings()->luaPreferObjectIds = true;
+ EXPECT_EQ(ViewerApp::ExitCode::Ok, this->m_app->run());
+ EXPECT_EQ(Result(), this->m_app->getLogicViewer()->loadLuaFile(luaFile));
+ }
+
TYPED_TEST(ALogicViewerApp_T, writeDefaultLuaConfiguration)
{
EXPECT_EQ(0, this->createApp({ "--write-config", ramsesFile }));
EXPECT_EQ(ViewerApp::ExitCode::Ok, this->m_app->run());
EXPECT_TRUE(fs::exists(luaFile));
+ EXPECT_EQ(Result(), this->m_app->getLogicViewer()->loadLuaFile(luaFile));
std::ifstream str(luaFile);
std::string genfile((std::istreambuf_iterator(str)), std::istreambuf_iterator());
EXPECT_EQ(defaultLuaFile, genfile);
@@ -607,6 +643,7 @@ namespace ramses::internal
EXPECT_EQ(0, this->createApp({ "--write-config", "--headless", ramsesFile }));
EXPECT_EQ(ViewerApp::ExitCode::Ok, this->m_app->run());
EXPECT_TRUE(fs::exists(luaFile));
+ EXPECT_EQ(Result(), m_app->getLogicViewer()->loadLuaFile(luaFile));
std::ifstream str(luaFile);
std::string genfile((std::istreambuf_iterator(str)), std::istreambuf_iterator());
EXPECT_EQ(defaultLuaFile, genfile);
@@ -672,9 +709,9 @@ namespace ramses::internal
SaveFile(R"(
function test_default()
-- stores a screenshot (relative to the working directory)
- rlogic.screenshot("test_red.png")
- rlogic.appearanceBindings.myAppearance.IN.green.value = 1
- rlogic.screenshot("test_yellow.png")
+ R.screenshot("test_red.png")
+ R.logic[""].appearanceBindings.myAppearance.IN.green.value = 1
+ R.screenshot("test_yellow.png")
end
)");
EXPECT_EQ(0, createApp({ "--exec=test_default", ramsesFile }));
@@ -688,9 +725,9 @@ namespace ramses::internal
this->SaveFile(R"(
function test_default()
-- stores a screenshot (relative to the working directory)
- rlogic.screenshot("test_red.png")
- rlogic.appearanceBindings.myAppearance.IN.green.value = 1
- rlogic.screenshot("test_yellow.png")
+ R.screenshot("test_red.png")
+ R.logic[""].appearanceBindings.myAppearance.IN.green.value = 1
+ R.screenshot("test_yellow.png")
)");
EXPECT_EQ(0, this->createApp({ "--exec=test_default", ramsesFile }));
EXPECT_EQ(ViewerApp::ExitCode::ErrorLoadLua, this->m_app->run());
@@ -700,13 +737,13 @@ namespace ramses::internal
{
SaveFile(R"(
function test_default(filename, greenVal)
- rlogic.appearanceBindings.myAppearance.IN.green.value = greenVal
- rlogic.screenshot(filename)
+ R.logic[""].appearanceBindings.myAppearance.IN.green.value = greenVal
+ R.screenshot(filename)
end
)");
EXPECT_EQ(0, createApp({ R"(--exec-lua=test_default('almost_yellow.png', 0.9))", ramsesFile }));
EXPECT_EQ(ViewerApp::ExitCode::Ok, m_app->run());
- auto appearance = m_app->getLogicViewer()->getLogic().findObject("myAppearance");
+ auto appearance = getLogic()->findObject("myAppearance");
ASSERT_TRUE(appearance != nullptr);
auto prop = appearance->getInputs()->getChild("green");
ASSERT_TRUE(prop != nullptr);
@@ -716,9 +753,9 @@ namespace ramses::internal
TYPED_TEST(ALogicViewerApp_T, exec_lua_code)
{
- EXPECT_EQ(0, this->createApp({ R"(--exec-lua=rlogic.appearanceBindings.myAppearance.IN.green.value = 0.44)", ramsesFile }));
+ EXPECT_EQ(0, this->createApp({ R"(--exec-lua=R.logic[""].appearanceBindings.myAppearance.IN.green.value = 0.44)", ramsesFile }));
EXPECT_EQ(ViewerApp::ExitCode::Ok, this->m_app->run());
- auto appearance = this->m_app->getLogicViewer()->getLogic().template findObject("myAppearance");
+ auto appearance = this->getLogic()->template findObject("myAppearance");
ASSERT_TRUE(appearance != nullptr);
auto prop = appearance->getInputs()->getChild("green");
ASSERT_TRUE(prop != nullptr);
@@ -728,16 +765,16 @@ namespace ramses::internal
TYPED_TEST(ALogicViewerApp_T, exec_lua_error)
{
testing::internal::CaptureStderr();
- EXPECT_EQ(0, this->createApp({ R"(--exec-lua=rlogic.appearanceBindings.myAppearance.IN.green = 0.44)", ramsesFile }));
+ EXPECT_EQ(0, this->createApp({ R"(--exec-lua=R.logic[""].appearanceBindings.myAppearance.IN.green = 0.44)", ramsesFile }));
EXPECT_EQ(ViewerApp::ExitCode::ErrorLoadLua, this->m_app->run());
EXPECT_THAT(testing::internal::GetCapturedStderr(), testing::HasSubstr("sol: cannot set (new_index) into this object"));
}
TEST_F(ALogicViewerGuiApp, exec_lua_headless)
{
- EXPECT_EQ(0, createApp({ R"(--exec-lua=rlogic.appearanceBindings.myAppearance.IN.green.value = 0.24)", "--headless", ramsesFile }));
+ EXPECT_EQ(0, createApp({ R"(--exec-lua=R.logic[""].appearanceBindings.myAppearance.IN.green.value = 0.24)", "--headless", ramsesFile }));
EXPECT_EQ(ViewerApp::ExitCode::Ok, m_app->run());
- auto appearance = m_app->getLogicViewer()->getLogic().findObject("myAppearance");
+ auto appearance = getLogic()->findObject("myAppearance");
ASSERT_TRUE(appearance != nullptr);
auto prop = appearance->getInputs()->getChild("green");
ASSERT_TRUE(prop != nullptr);
@@ -747,7 +784,7 @@ namespace ramses::internal
TEST_F(ALogicViewerGuiApp, exec_lua_screenshot_headless)
{
testing::internal::CaptureStderr();
- EXPECT_EQ(0, this->createApp({ R"(--exec-lua=rlogic.screenshot("screenshot.png"))", "--headless", ramsesFile }));
+ EXPECT_EQ(0, this->createApp({ R"(--exec-lua=R.screenshot("screenshot.png"))", "--headless", ramsesFile }));
EXPECT_EQ(ViewerApp::ExitCode::ErrorLoadLua, this->m_app->run());
EXPECT_THAT(testing::internal::GetCapturedStderr(), testing::HasSubstr("No screenshots available in current configuration"));
}
@@ -757,9 +794,9 @@ namespace ramses::internal
SaveFile(R"(
function test_default()
-- stores a screenshot (relative to the working directory)
- rlogic.screenshot("test_red.png")
- rlogic.appearanceBindings.myAppearance.IN.green.value = 1
- rlogic.screenshot("test_yellow.png")
+ R.screenshot("test_red.png")
+ R.logic[""].appearanceBindings.myAppearance.IN.green.value = 1
+ R.screenshot("test_yellow.png")
)");
EXPECT_EQ(0, createApp({ ramsesFile }));
EXPECT_EQ(ViewerApp::ExitCode::Ok, m_app->setup());
@@ -775,7 +812,7 @@ namespace ramses::internal
SaveFile(R"(
function test_default()
-- stores a screenshot (relative to the working directory)
- rlogic.screenshot("test_red.png")
+ R.screenshot("test_red.png")
end
)");
EXPECT_EQ(0, createApp({ "--exec=test_default", ramsesFile }));
@@ -788,7 +825,7 @@ namespace ramses::internal
SaveFile(R"(
function test_default()
-- stores a screenshot (relative to the working directory)
- rlogic.screenshot("test_red.png")
+ R.screenshot("test_red.png")
end
)");
EXPECT_EQ(0, createApp({ "--exec=test_default", "--width", "500", "--height", "700", ramsesFile }));
@@ -800,24 +837,24 @@ namespace ramses::internal
{
m_app->getSettings()->showLogicWindow = false;
const int32_t xFile = 25;
- auto* script = m_app->getLogicViewer()->getLogic().findObject("allTypesScript");
+ auto* script = getLogic()->findObject("allTypesScript");
ASSERT_TRUE(script != nullptr);
auto* prop = script->getOutputs()->getChild("paramString");
ASSERT_TRUE(prop != nullptr);
- SaveFile(R"(rlogic.scripts.allTypesScript.IN.paramString.value = "Hello")");
+ SaveFile(R"(R.logic[""].scripts.allTypesScript.IN.paramString.value = "Hello")");
EXPECT_TRUE(m_app->doOneLoop());
EXPECT_EQ("", prop->get().value()); // not reloaded automatically
EXPECT_TRUE(keyPress(ramses::EKeyCode_F5)); // reload configuration
EXPECT_EQ("Hello", prop->get().value());
- SaveFile(R"(rlogic.scripts.allTypesScript.IN.paramString.value = "World")");
+ SaveFile(R"(R.logic[""].scripts.allTypesScript.IN.paramString.value = "World")");
EXPECT_TRUE(click(xFile, ui.titleBar + ui.yMiddle));
EXPECT_TRUE(click(xFile, ui.titleBar + ui.buttonHeight + 4*ui.smallButtonHeight + ui.yMiddle));
EXPECT_EQ("World", prop->get().value());
- SaveFile(R"(rlogic.scripts.allTypesScript.IN.paramString.value = "Foo")");
+ SaveFile(R"(R.logic[""].scripts.allTypesScript.IN.paramString.value = "Foo")");
EXPECT_TRUE(contextMenuSelect(700, 350, 8));
EXPECT_EQ("Foo", prop->get().value());
}
@@ -826,12 +863,12 @@ namespace ramses::internal
{
auto* settings = m_app->getSettings();
settings->showWindow = false;
- auto* script = m_app->getLogicViewer()->getLogic().findObject("allTypesScript");
+ auto* script = getLogic()->findObject("allTypesScript");
ASSERT_TRUE(script != nullptr);
auto* prop = script->getOutputs()->getChild("paramString");
ASSERT_TRUE(prop != nullptr);
- SaveFile(R"(rlogic.scripts.allTypesScript.IN.paramString.value = "Hello")");
+ SaveFile(R"(R.logic[""].scripts.allTypesScript.IN.paramString.value = "Hello")");
EXPECT_TRUE(m_app->doOneLoop());
EXPECT_EQ("", prop->get().value()); // not reloaded automatically
@@ -846,8 +883,8 @@ namespace ramses::internal
name = "Red",
description = "Shows a red triangle",
update = function(time_ms)
- rlogic.appearanceBindings["myAppearance"]["IN"]["green"].value = 0
- rlogic.appearanceBindings.myAppearance.IN.blue.value = 0
+ R.logic[""].appearanceBindings["myAppearance"]["IN"]["green"].value = 0
+ R.logic[""].appearanceBindings.myAppearance.IN.blue.value = 0
end
}
@@ -855,15 +892,15 @@ namespace ramses::internal
name = "Yellow",
description = "Shows a yellow triangle",
update = function(time_ms)
- rlogic.appearanceBindings["myAppearance"]["IN"]["green"].value = 1
+ R.logic[""].appearanceBindings["myAppearance"]["IN"]["green"].value = 1
end,
- inputs = {rlogic.appearanceBindings.myAppearance.IN.blue}
+ inputs = {R.logic[""].appearanceBindings.myAppearance.IN.blue}
}
- rlogic.views = {red, yellow}
+ R.views = {red, yellow}
function screenshot()
- rlogic.screenshot("screenshot.png")
+ R.screenshot("screenshot.png")
end
)");
@@ -927,7 +964,7 @@ namespace ramses::internal
{
SaveFile(R"(
function screenshot()
- rlogic.screenshot("screenshot.png")
+ R.screenshot("screenshot.png")
end
)");
EXPECT_TRUE(keyPress(ramses::EKeyCode_F5)); // reload configuration
@@ -953,10 +990,10 @@ ShowLogicWindow=1
LuaPreferObjectIds=0
LuaPreferIdentifiers=0
)");
- m_app->getSettings()->showUpdateReportDetails = true;
const int32_t mouseX = 100;
+ EXPECT_TRUE(click(300, ui.updateReport()));
- const auto& report = m_app->getLogicViewer()->getUpdateReport();
+ const auto& report = m_app->getLogicViewer()->getUpdateReport(*m_app->getLogicViewer()->getLogicEngines()[0]);
// set update interval to 1 to avoid random test failures
// (only the longest update is reported for an interval)
@@ -965,7 +1002,7 @@ LuaPreferIdentifiers=0
EXPECT_EQ(1u, report.getInterval());
EXPECT_EQ(12, report.getNodesExecuted().size() + report.getNodesSkippedExecution().size());
- auto* interface = m_app->getLogicViewer()->getLogic().findObject("myInterface");
+ auto* interface = getLogic()->findObject("myInterface");
ASSERT_TRUE(interface != nullptr);
auto* prop = interface->getInputs()->getChild("paramFloat");
ASSERT_TRUE(prop != nullptr);
diff --git a/tests/unittests/tools/ramses-viewer/CMakeLists.txt b/tests/unittests/tools/ramses-viewer/CMakeLists.txt
index d9222a042..88a70afdc 100644
--- a/tests/unittests/tools/ramses-viewer/CMakeLists.txt
+++ b/tests/unittests/tools/ramses-viewer/CMakeLists.txt
@@ -16,6 +16,7 @@ createModule(
LogicViewerTestBase.cpp
LogicViewerTest.cpp
LogicViewerLuaTest.cpp
+ LogicViewer2EnginesLuaTest.cpp
ValidationCacheTest.cpp
DEPENDENCIES ramses-viewer-lib
ramses-client
diff --git a/tests/unittests/tools/ramses-viewer/LogicViewer2EnginesLuaTest.cpp b/tests/unittests/tools/ramses-viewer/LogicViewer2EnginesLuaTest.cpp
new file mode 100644
index 000000000..24a535880
--- /dev/null
+++ b/tests/unittests/tools/ramses-viewer/LogicViewer2EnginesLuaTest.cpp
@@ -0,0 +1,377 @@
+// -------------------------------------------------------------------------
+// Copyright (C) 2023 BMW AG
+// -------------------------------------------------------------------------
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
+// -------------------------------------------------------------------------
+
+#include "LogicViewerTestBase.h"
+#include "ramses/client/logic/AnimationNodeConfig.h"
+#include "ramses/client/logic/RenderGroupBindingElements.h"
+
+namespace ramses::internal
+{
+ /**
+ * Tests for the lua configuration file handling
+ */
+ class ALogicViewerLua2Engines : public ALogicViewerBase
+ {
+ public:
+ ALogicViewerLua2Engines()
+ : ALogicViewerBase(2)
+ {
+ setupLogic();
+ }
+
+ static auto* SetupInterface(LogicEngine& engine)
+ {
+ return engine.createLuaInterface(R"(
+ function interface(IN,OUT)
+ IN.paramInt32 = Type:Int32()
+ end
+ )", "foo");
+ }
+
+ static auto* SetupScript(LogicEngine& engine, int32_t value)
+ {
+ return engine.createLuaScript(fmt::format(R"(
+ function interface(IN,OUT)
+ IN.paramInt32 = Type:Int32()
+ IN.bar = Type:Int32()
+ OUT.paramInt32 = Type:Int32()
+ end
+ function run(IN,OUT)
+ OUT.paramInt32 = 2 * IN.paramInt32 + {}
+ end
+ )", value), {}, "foo");
+ }
+
+ void setupLogic()
+ {
+ auto* interface0 = SetupInterface(*m_logicEngines[0]);
+ auto* interface1 = SetupInterface(*m_logicEngines[1]);
+ auto* script0 = SetupScript(*m_logicEngines[0], 0);
+ auto* script1 = SetupScript(*m_logicEngines[1], 1);
+
+ ASSERT_TRUE(script0 != nullptr);
+ ASSERT_TRUE(script1 != nullptr);
+
+ m_logicEngines[0]->link(
+ *interface0->getOutputs()->getChild("paramInt32"),
+ *script0->getInputs()->getChild("paramInt32"));
+
+ m_logicEngines[1]->link(
+ *interface1->getOutputs()->getChild("paramInt32"),
+ *script1->getInputs()->getChild("paramInt32"));
+
+ m_logicEngines[0]->update();
+ m_logicEngines[1]->update();
+ }
+ };
+
+ TEST_F(ALogicViewerLua2Engines, loadLuaFileEmpty)
+ {
+ EXPECT_EQ(Result(), loadLua(""));
+ }
+
+ TEST_F(ALogicViewerLua2Engines, setInputByEngine0Name)
+ {
+ const Result ok;
+ EXPECT_EQ(ok, loadLua(R"(R.logic["logic0"].interfaces.foo.IN.paramInt32.value = 42)"));
+ auto* property = getInput(*m_logicEngines[0], "foo", "paramInt32");
+ EXPECT_EQ(42, property->get());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, setInputByEngine1Name)
+ {
+ const Result ok;
+ EXPECT_EQ(ok, loadLua(R"(R.logic["logic1"].interfaces.foo.IN.paramInt32.value = 43)"));
+ auto* property = getInput(*m_logicEngines[1], "foo", "paramInt32");
+ EXPECT_EQ(43, property->get());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, setInputByEngine0Id)
+ {
+ const Result ok;
+ EXPECT_EQ(ok, loadLua(fmt::format(R"(R.logic[{}].interfaces.foo.IN.paramInt32.value = 42)", m_logicEngines[0]->getSceneObjectId().getValue())));
+ auto* property = getInput(*m_logicEngines[0], "foo", "paramInt32");
+ EXPECT_EQ(42, property->get());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, setInputByEngine1Id)
+ {
+ const Result ok;
+ EXPECT_EQ(ok, loadLua(fmt::format(R"(R.logic[{}].interfaces.foo.IN.paramInt32.value = 43)", m_logicEngines[1]->getSceneObjectId().getValue())));
+ auto* property = getInput(*m_logicEngines[1], "foo", "paramInt32");
+ EXPECT_EQ(43, property->get());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, findAllLogicEngines)
+ {
+ const Result ok;
+ EXPECT_EQ(ok, loadLua(R"(
+ a,b = R.logic()
+ a.interfaces.foo.IN.paramInt32.value = 42
+ b.interfaces.foo.IN.paramInt32.value = 43
+ )"));
+ auto* property0 = getInput(*m_logicEngines[0], "foo", "paramInt32");
+ EXPECT_EQ(42, property0->get());
+ auto* property1 = getInput(*m_logicEngines[1], "foo", "paramInt32");
+ EXPECT_EQ(43, property1->get());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, iterateAllLogicEngines)
+ {
+ const Result ok;
+ EXPECT_EQ(ok, loadLua(R"(
+ for i, engine in ipairs({R.logic()}) do
+ engine.interfaces.foo.IN.paramInt32.value = i
+ end
+ )"));
+ auto* property0 = getInput(*m_logicEngines[0], "foo", "paramInt32");
+ EXPECT_EQ(1, *property0->get());
+ auto* property1 = getInput(*m_logicEngines[1], "foo", "paramInt32");
+ EXPECT_EQ(2, *property1->get());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, viewsAreGlobal)
+ {
+ const Result ok;
+ EXPECT_NE(ok, loadLua(R"(
+ defaultView = {
+ name = "Default View",
+ description = "Description for the default view",
+ update = function(time_ms)
+ R.logic.logic0.interfaces.foo.IN.paramInt32.value = 42
+ R.logic.logic1.interfaces.foo.IN.paramInt32.value = 142
+ end
+ }
+
+ R.logic.logic1.views = {defaultView}
+ )"));
+
+ // Views are global (not engine specific)
+ EXPECT_EQ(0u, viewer->getViewCount());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, simpleView)
+ {
+ const Result ok;
+ auto* property0 = getInput(*m_logicEngines[0], "foo", "paramInt32");
+ auto* property1 = getInput(*m_logicEngines[1], "foo", "paramInt32");
+ EXPECT_EQ(0u, viewer->getViewCount());
+ EXPECT_FALSE(viewer->getView(0u).isValid());
+ EXPECT_FALSE(viewer->getView(1u).isValid());
+ EXPECT_EQ(0, property0->get().value());
+ EXPECT_EQ(0, property1->get().value());
+
+ EXPECT_EQ(ok, loadLua(R"(
+ defaultView = {
+ name = "Default View",
+ description = "Description for the default view",
+ update = function(time_ms)
+ R.logic.logic0.interfaces.foo.IN.paramInt32.value = 42
+ R.logic.logic1.interfaces.foo.IN.paramInt32.value = 142
+ end
+ }
+
+ R.views = {defaultView}
+ )"));
+
+ EXPECT_EQ(1u, viewer->getViewCount());
+ EXPECT_EQ(1u, viewer->getCurrentView());
+ auto view = viewer->getView(1u);
+ EXPECT_TRUE(view.isValid());
+ EXPECT_EQ("Default View", view.name());
+ EXPECT_EQ("Description for the default view", view.description());
+ EXPECT_EQ(0u, view.getInputCount());
+ EXPECT_EQ(nullptr, view.getInput(0u));
+
+ EXPECT_EQ(ok, viewer->update());
+ EXPECT_EQ(42, property0->get().value());
+ EXPECT_EQ(142, property1->get().value());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, viewWithInputs)
+ {
+ const Result ok;
+ auto* property0 = getInput(*m_logicEngines[0], "foo", "paramInt32");
+ auto* property1 = getInput(*m_logicEngines[1], "foo", "paramInt32");
+
+ EXPECT_EQ(ok, loadLua(R"(
+ defaultView = {
+ name = "View1",
+ description = "View with 2 user inputs from different engines",
+ update = function(time_ms)
+ end,
+ inputs = {R.logic.logic0.interfaces.foo.IN.paramInt32, R.logic.logic1.interfaces.foo.IN.paramInt32}
+ }
+
+ R.views = {defaultView}
+ )"));
+
+ EXPECT_EQ(1u, viewer->getViewCount());
+ EXPECT_EQ(1u, viewer->getCurrentView());
+ auto view = viewer->getView(1u);
+ EXPECT_TRUE(view.isValid());
+ EXPECT_EQ("View1", view.name());
+ EXPECT_EQ("View with 2 user inputs from different engines", view.description());
+ EXPECT_EQ(2u, view.getInputCount());
+ EXPECT_EQ(property0, view.getInput(0u));
+ EXPECT_EQ(property1, view.getInput(1u));
+ }
+
+ TEST_F(ALogicViewerLua2Engines, changeView)
+ {
+ const Result ok;
+ auto* property0 = getInput(*m_logicEngines[0], "foo", "paramInt32");
+ auto* property1 = getInput(*m_logicEngines[1], "foo", "paramInt32");
+
+ EXPECT_EQ(ok, loadLua(R"(
+ view1 = {
+ name = "View1",
+ description = "View1 with 2 user inputs",
+ update = function(time_ms)
+ end,
+ inputs = {
+ R.logic["logic0"].interfaces.foo.IN.paramInt32,
+ R.logic["logic1"].interfaces.foo.IN.paramInt32,
+ }
+ }
+
+ view2 = {
+ name = "View2",
+ description = "View2 with no inputs",
+ update = function(time_ms)
+ R.logic["logic1"].interfaces.foo.IN.paramInt32.value = 1773
+ end,
+ }
+
+ R.views = {view1, view2}
+ )"));
+
+ EXPECT_EQ(2u, viewer->getViewCount());
+ EXPECT_EQ(1u, viewer->getCurrentView());
+ auto view1 = viewer->getView(1u);
+ EXPECT_TRUE(view1.isValid());
+ EXPECT_EQ("View1", view1.name());
+ EXPECT_EQ("View1 with 2 user inputs", view1.description());
+ EXPECT_EQ(2u, view1.getInputCount());
+ EXPECT_EQ(property0, view1.getInput(0u));
+ EXPECT_EQ(property1, view1.getInput(1u));
+
+ EXPECT_EQ(ok, viewer->update());
+ EXPECT_EQ(0, property0->get().value());
+ EXPECT_EQ(0, property1->get().value());
+
+ viewer->setCurrentView(2u);
+
+ EXPECT_EQ(2u, viewer->getCurrentView());
+ auto view2 = viewer->getView(2u);
+ EXPECT_EQ("View2", view2.name());
+ EXPECT_EQ("View2 with no inputs", view2.description());
+ EXPECT_EQ(0u, view2.getInputCount());
+
+ EXPECT_EQ(ok, viewer->update());
+ EXPECT_EQ(0, property0->get().value());
+ EXPECT_EQ(1773, property1->get().value());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, callByName)
+ {
+ const Result ok;
+ auto* property0 = getInput(*m_logicEngines[0], "foo", "paramInt32");
+ auto* property1 = getInput(*m_logicEngines[1], "foo", "paramInt32");
+
+ EXPECT_EQ(ok, loadLua(R"(
+ function f1()
+ R.logic["logic0"].interfaces.foo.IN.paramInt32.value = -91
+ end
+
+ function f2()
+ R.logic["logic1"].interfaces.foo.IN.paramInt32.value = 908
+ end
+ )"));
+
+ EXPECT_EQ(0, property0->get().value());
+ EXPECT_EQ(0, property1->get().value());
+ EXPECT_EQ(ok, viewer->call("f1"));
+ EXPECT_EQ(-91, property0->get().value());
+ EXPECT_EQ(ok, viewer->call("f2"));
+ EXPECT_EQ(908, property1->get().value());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, update)
+ {
+ const Result ok;
+ EXPECT_EQ(Result(), loadLua(R"(
+ function update0()
+ R.logic["logic0"].update()
+ end
+ function update1()
+ R.logic["logic1"].update()
+ end
+ )"));
+
+ EXPECT_EQ(0, getOutput(*m_logicEngines[0], "foo", "paramInt32")->get());
+ EXPECT_EQ(1, getOutput(*m_logicEngines[1], "foo", "paramInt32")->get());
+
+ EXPECT_TRUE(getInput(*m_logicEngines[0], "foo", "paramInt32")->set(static_cast(42)));
+ EXPECT_TRUE(getInput(*m_logicEngines[1], "foo", "paramInt32")->set(static_cast(142)));
+
+ EXPECT_EQ(ok, viewer->call("update1"));
+ EXPECT_EQ(0, *getOutput(*m_logicEngines[0], "foo", "paramInt32")->get());
+ EXPECT_EQ(2 * 142 + 1, *getOutput(*m_logicEngines[1], "foo", "paramInt32")->get());
+
+ EXPECT_EQ(ok, viewer->call("update0"));
+ EXPECT_EQ(2 * 42, *getOutput(*m_logicEngines[0], "foo", "paramInt32")->get());
+ EXPECT_EQ(2 * 142 + 1, *getOutput(*m_logicEngines[1], "foo", "paramInt32")->get());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, link_unlink)
+ {
+ auto* in = getInput(*m_logicEngines[1], "foo", "bar");
+ EXPECT_FALSE(in->isLinked());
+ EXPECT_FALSE(in->hasIncomingLink());
+ EXPECT_FALSE(in->hasOutgoingLink());
+
+ EXPECT_EQ(Result(), loadLua(R"(
+ R.logic.logic1.link(R.logic.logic1.interfaces.foo.OUT.paramInt32, R.logic.logic1.scripts.foo.IN.bar)
+ )"));
+
+ EXPECT_TRUE(in->isLinked());
+ EXPECT_TRUE(in->hasIncomingLink());
+ EXPECT_FALSE(in->hasOutgoingLink());
+
+ EXPECT_EQ(Result(), loadLua(R"(
+ R.logic.logic1.unlink(R.logic.logic1.interfaces.foo.OUT.paramInt32, R.logic.logic1.scripts.foo.IN.bar)
+ )"));
+ EXPECT_FALSE(in->isLinked());
+ EXPECT_FALSE(in->hasIncomingLink());
+ EXPECT_FALSE(in->hasOutgoingLink());
+ }
+
+ TEST_F(ALogicViewerLua2Engines, enableUpdateReport)
+ {
+ // set update interval to 1 to avoid random test failures
+ // (only the longest update is reported for an interval)
+ const size_t updateInterval = 1u; // in frames
+ EXPECT_FALSE(viewer->isUpdateReportEnabled());
+ auto& summary0 = viewer->getUpdateReport(*m_logicEngines[0]);
+ auto& summary1 = viewer->getUpdateReport(*m_logicEngines[1]);
+
+ viewer->enableUpdateReport(true, updateInterval);
+ EXPECT_TRUE(viewer->isUpdateReportEnabled());
+ EXPECT_TRUE(getInput(*m_logicEngines[1], "foo", "paramInt32")->set(static_cast(142)));
+ EXPECT_EQ(Result(), viewer->update());
+
+ EXPECT_EQ(0u, summary0.getLinkActivations().maxValue);
+ EXPECT_EQ(0u, summary0.getNodesExecuted().size());
+ EXPECT_EQ(2u, summary0.getNodesSkippedExecution().size());
+
+ EXPECT_EQ(1u, summary1.getLinkActivations().maxValue);
+ EXPECT_EQ(2u, summary1.getNodesExecuted().size());
+ EXPECT_EQ(0u, summary1.getNodesSkippedExecution().size());
+ }
+}
diff --git a/tests/unittests/tools/ramses-viewer/LogicViewerLuaTest.cpp b/tests/unittests/tools/ramses-viewer/LogicViewerLuaTest.cpp
index 0b5c14fbb..40d98894c 100644
--- a/tests/unittests/tools/ramses-viewer/LogicViewerLuaTest.cpp
+++ b/tests/unittests/tools/ramses-viewer/LogicViewerLuaTest.cpp
@@ -20,12 +20,32 @@ namespace ramses::internal
public:
ALogicViewerLua()
{
- setupLogic();
+ m_logic = m_logicEngines[0];
+ setupLogic(*m_logic);
}
- void setupLogic()
+ template
+ ramses::Property* getInput(std::string_view nodeName, std::string_view propertyName)
+ {
+ return GetInput(getNode(*m_logic, nodeName), propertyName);
+ }
+
+ template
+ const ramses::Property* getOutput(std::string_view nodeName, std::string_view propertyName)
+ {
+ return GetOutput(getNode(*m_logic, nodeName), propertyName);
+ }
+
+ using ALogicViewerBase::getNode;
+
+ template
+ T* getNode(std::string_view nodeName)
+ {
+ return ALogicViewerBase::getNode(*m_logic, nodeName);
+ }
+
+ void setupLogic(LogicEngine& engine)
{
- LogicEngine& engine = *m_logic;
auto *interface = engine.createLuaInterface(R"(
function interface(IN,OUT)
IN.paramInt32 = Type:Int32()
@@ -190,8 +210,10 @@ namespace ramses::internal
{
assert(inputProperty.hasIncomingLink());
ramses::Property& sourceProperty = *inputProperty.getIncomingLink()->source;
- EXPECT_TRUE(viewer.getLogic().unlink(sourceProperty, inputProperty));
+ EXPECT_TRUE(m_logic->unlink(sourceProperty, inputProperty));
}
+
+ LogicEngine* m_logic;
};
TEST_F(ALogicViewerLua, loadLuaFileEmpty)
@@ -199,20 +221,28 @@ namespace ramses::internal
EXPECT_EQ(Result(), loadLua(""));
}
+ TEST_F(ALogicViewerLua, findDefaultEngine)
+ {
+ const Result ok;
+ EXPECT_EQ(ok, loadLua(R"(R.logic().interfaces.foo.IN.paramInt32.value = 42)"));
+ auto* property = getInput("foo", "paramInt32");
+ EXPECT_EQ(42, property->get());
+ }
+
TEST_F(ALogicViewerLua, setInputBool)
{
const Result ok;
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.paramBool.value = true)"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.paramBool.value = true)"));
auto* property = getInput("foo", "paramBool");
EXPECT_TRUE(property->get().value());
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.paramBool.value = false)"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.paramBool.value = false)"));
EXPECT_FALSE(property->get().value());
}
TEST_F(ALogicViewerLua, setInputInt32)
{
const Result ok;
- EXPECT_EQ(ok, loadLua(R"(rlogic.interfaces.foo.IN.paramInt32.value = 42)"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().interfaces.foo.IN.paramInt32.value = 42)"));
auto* property = getInput("foo", "paramInt32");
EXPECT_EQ(42, property->get());
}
@@ -221,14 +251,14 @@ namespace ramses::internal
{
const Result ok;
auto* property = getInput("foo", "paramInt64");
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.paramInt64.value = 42)"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.paramInt64.value = 42)"));
EXPECT_EQ(42, property->get());
}
TEST_F(ALogicViewerLua, setInputFloat)
{
const Result ok;
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.paramFloat.value = 42.5)"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.paramFloat.value = 42.5)"));
auto* property = getInput("foo", "paramFloat");
EXPECT_FLOAT_EQ(42.5f, property->get().value());
}
@@ -237,7 +267,7 @@ namespace ramses::internal
{
const Result ok;
auto* property = getInput("foo", "paramString");
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.paramString.value = "Hello World")"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.paramString.value = "Hello World")"));
EXPECT_EQ("Hello World", property->get());
}
@@ -245,7 +275,7 @@ namespace ramses::internal
{
const Result ok;
auto* property = getInput("foo", "paramVec2f");
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.paramVec2f.value = {42.5, 1.3})"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.paramVec2f.value = {42.5, 1.3})"));
EXPECT_FLOAT_EQ(42.5f, property->get().value()[0]);
EXPECT_FLOAT_EQ(1.3f, property->get().value()[1]);
}
@@ -254,7 +284,7 @@ namespace ramses::internal
{
const Result ok;
auto* property = getInput("foo", "paramVec3f");
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.paramVec3f.value = {42.5, 1.3, 100000})"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.paramVec3f.value = {42.5, 1.3, 100000})"));
EXPECT_FLOAT_EQ(42.5f, property->get().value()[0]);
EXPECT_FLOAT_EQ(1.3f, property->get().value()[1]);
EXPECT_FLOAT_EQ(100000.f, property->get().value()[2]);
@@ -264,7 +294,7 @@ namespace ramses::internal
{
const Result ok;
auto* property = getInput("foo", "paramVec4f");
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.paramVec4f.value = {42.5, 1.3, -8.2, 0.0001})"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.paramVec4f.value = {42.5, 1.3, -8.2, 0.0001})"));
EXPECT_FLOAT_EQ(42.5f, property->get().value()[0]);
EXPECT_FLOAT_EQ(1.3f, property->get().value()[1]);
EXPECT_FLOAT_EQ(-8.2f, property->get().value()[2]);
@@ -275,7 +305,7 @@ namespace ramses::internal
{
const Result ok;
auto* property = getInput("foo", "paramVec2i");
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.paramVec2i.value = {5, -18})"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.paramVec2i.value = {5, -18})"));
EXPECT_EQ(ramses::vec2i({5, -18}), property->get());
}
@@ -283,7 +313,7 @@ namespace ramses::internal
{
const Result ok;
auto* property = getInput("foo", "paramVec3i");
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.paramVec3i.value = {5, 0xffad, -10000})"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.paramVec3i.value = {5, 0xffad, -10000})"));
EXPECT_EQ(ramses::vec3i({5, 0xffad, -10000}), property->get());
}
@@ -291,7 +321,7 @@ namespace ramses::internal
{
const Result ok;
auto* property = getInput("foo", "paramVec4i");
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.paramVec4i.value = {2147483647, -2147483647, 5, -18})"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.paramVec4i.value = {2147483647, -2147483647, 5, -18})"));
EXPECT_EQ(ramses::vec4i({2147483647, -2147483647, 5, -18}), property->get());
}
@@ -299,7 +329,7 @@ namespace ramses::internal
{
const Result ok;
auto* property = getInput("foo", "array");
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.array.value = {99, 118.119, 1.3, -8.2, 0.0001})"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.array.value = {99, 118.119, 1.3, -8.2, 0.0001})"));
EXPECT_EQ(5u, property->getChildCount());
EXPECT_FLOAT_EQ(99.f, property->getChild(0)->get().value());
EXPECT_FLOAT_EQ(118.119f, property->getChild(1)->get().value());
@@ -312,28 +342,28 @@ namespace ramses::internal
{
auto* property = getInput("foo", "array");
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.array.value = {99, 42, 11, 13, 0.1}
- rlogic.scripts.foo.IN.array[1].value = rlogic.scripts.foo.IN.array[5].value
+ R.logic().scripts.foo.IN.array.value = {99, 42, 11, 13, 0.1}
+ R.logic().scripts.foo.IN.array[1].value = R.logic().scripts.foo.IN.array[5].value
)"));
EXPECT_FLOAT_EQ(0.1f, property->getChild(0)->get().value());
}
TEST_F(ALogicViewerLua, setInputArrayFloatOutOfBounds)
{
- EXPECT_THAT(loadLua(R"(rlogic.scripts.foo.IN.array.value = {99, 118.119, 1.3, -8.2, 0.0001, 12})").getMessage(),
+ EXPECT_THAT(loadLua(R"(R.logic().scripts.foo.IN.array.value = {99, 118.119, 1.3, -8.2, 0.0001, 12})").getMessage(),
testing::HasSubstr("index 6 out of bounds for array array[5]"));
}
TEST_F(ALogicViewerLua, setInputArrayByIndexOutOfBounds)
{
- auto result = loadLua(R"(rlogic.scripts.foo.IN.array[6].value = 14)");
+ auto result = loadLua(R"(R.logic().scripts.foo.IN.array[6].value = 14)");
EXPECT_THAT(result.getMessage(), testing::HasSubstr("attempt to index"));
EXPECT_THAT(result.getMessage(), testing::HasSubstr("a nil value"));
}
TEST_F(ALogicViewerLua, setInputArrayByIndexBadSyntax)
{
- EXPECT_THAT(loadLua(R"(rlogic.scripts.foo.IN.array.value[6] = 14)").getMessage(),
+ EXPECT_THAT(loadLua(R"(R.logic().scripts.foo.IN.array.value[6] = 14)").getMessage(),
testing::HasSubstr("attempt to index field 'value' (a nil value)"));
}
@@ -341,38 +371,38 @@ namespace ramses::internal
{
const Result ok;
auto* property = getInput("foo", "struct");
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.struct.value = { nested = {data1 = "Baz", data2 = 400}})"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.struct.value = { nested = {data1 = "Baz", data2 = 400}})"));
EXPECT_EQ("Baz", property->getChild("nested")->getChild("data1")->get());
EXPECT_EQ(400, property->getChild("nested")->getChild("data2")->get());
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.struct.nested.data1.value = "Foo")"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.struct.nested.data1.value = "Foo")"));
EXPECT_EQ("Foo", property->getChild("nested")->getChild("data1")->get());
EXPECT_EQ(400, property->getChild("nested")->getChild("data2")->get());
- EXPECT_EQ(ok, loadLua(R"(rlogic.scripts.foo.IN.struct.nested.data2.value = -12)"));
+ EXPECT_EQ(ok, loadLua(R"(R.logic().scripts.foo.IN.struct.nested.data2.value = -12)"));
EXPECT_EQ("Foo", property->getChild("nested")->getChild("data1")->get());
EXPECT_EQ(-12, property->getChild("nested")->getChild("data2")->get());
}
TEST_F(ALogicViewerLua, setInputStructNotAKey)
{
- EXPECT_THAT(loadLua(R"(rlogic.scripts.foo.IN.struct.value = { notAKey = {data1 = "Baz", data2 = 400}})").getMessage(),
+ EXPECT_THAT(loadLua(R"(R.logic().scripts.foo.IN.struct.value = { notAKey = {data1 = "Baz", data2 = 400}})").getMessage(),
testing::HasSubstr("Property not found in struct: notAKey"));
}
TEST_F(ALogicViewerLua, getOutputBool)
{
const auto lua = R"(
- if rlogic.scripts.foo.OUT.paramBool.value then
- rlogic.scripts.foo.IN.paramString.value = "true"
+ if R.logic().scripts.foo.OUT.paramBool.value then
+ R.logic().scripts.foo.IN.paramString.value = "true"
else
- rlogic.scripts.foo.IN.paramString.value = "false"
+ R.logic().scripts.foo.IN.paramString.value = "false"
end
)";
EXPECT_TRUE(getInput("foo", "paramBool")->set(false));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(lua));
EXPECT_EQ("true", getInput("foo", "paramString")->get().value());
EXPECT_TRUE(getInput("foo", "paramBool")->set(true));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(lua));
EXPECT_EQ("false", getInput("foo", "paramString")->get().value());
}
@@ -380,9 +410,9 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, getOutputInt32)
{
EXPECT_TRUE(getInput("foo", "paramInt32")->set(static_cast(43)));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.paramInt32.value
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.paramInt32.value
)"));
EXPECT_EQ("86", getInput("foo", "paramString")->get().value());
}
@@ -390,9 +420,9 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, getOutputInt64)
{
EXPECT_TRUE(getInput("foo", "paramInt64")->set(static_cast(12)));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.paramInt64.value
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.paramInt64.value
)"));
EXPECT_EQ("13", getInput("foo", "paramString")->get().value());
}
@@ -400,9 +430,9 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, getOutputFloat)
{
EXPECT_TRUE(getInput("foo", "paramFloat")->set(-3.2f));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.paramFloat.value
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.paramFloat.value
)"));
EXPECT_THAT(getInput("foo", "paramString")->get().value(), testing::StartsWith("-9.6"));
}
@@ -410,9 +440,9 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, getOutputString)
{
EXPECT_TRUE(getInput("foo", "paramString")->set(std::string("Hello")));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.paramString.value
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.paramString.value
)"));
EXPECT_EQ("Hellofoo", getInput("foo", "paramString")->get().value());
}
@@ -420,9 +450,9 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, getOutputVec2f)
{
EXPECT_TRUE(getInput("foo", "paramFloat")->set(1.0f));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.paramVec2f.value[2]
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.paramVec2f.value[2]
)"));
EXPECT_EQ("1", getInput("foo", "paramString")->get().value());
}
@@ -430,9 +460,9 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, getOutputVec3f)
{
EXPECT_TRUE(getInput("foo", "paramFloat")->set(2.0f));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.paramVec3f.value[3]
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.paramVec3f.value[3]
)"));
EXPECT_EQ("2", getInput("foo", "paramString")->get().value());
}
@@ -440,9 +470,9 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, getOutputVec4f)
{
EXPECT_TRUE(getInput("foo", "paramFloat")->set(-1.0f));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.paramVec4f.value[4]
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.paramVec4f.value[4]
)"));
EXPECT_EQ("-1", getInput("foo", "paramString")->get().value());
}
@@ -450,9 +480,9 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, getOutputVec2i)
{
EXPECT_TRUE(getInput("foo", "paramInt32")->set(17));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.paramVec2i.value[2]
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.paramVec2i.value[2]
)"));
EXPECT_EQ("17", getInput("foo", "paramString")->get().value());
}
@@ -460,9 +490,9 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, getOutputVec3i)
{
EXPECT_TRUE(getInput("foo", "paramInt32")->set(18));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.paramVec3i.value[3]
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.paramVec3i.value[3]
)"));
EXPECT_EQ("18", getInput("foo", "paramString")->get().value());
}
@@ -470,9 +500,9 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, getOutputVec4i)
{
EXPECT_TRUE(getInput("foo", "paramInt32")->set(19));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.paramVec4i.value[4]
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.paramVec4i.value[4]
)"));
EXPECT_EQ("19", getInput("foo", "paramString")->get().value());
}
@@ -480,14 +510,14 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, getOutputArray)
{
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.array[5].value
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.array[5].value
)"));
EXPECT_EQ("50", getInput("foo", "paramString")->get().value());
}
TEST_F(ALogicViewerLua, getOutputArrayOutOfBounds)
{
- const auto result = loadLua(R"(rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.array[6].value)");
+ const auto result = loadLua(R"(R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.array[6].value)");
EXPECT_THAT(result.getMessage(), testing::HasSubstr("attempt to index"));
EXPECT_THAT(result.getMessage(), testing::HasSubstr("a nil value"));
}
@@ -496,9 +526,9 @@ namespace ramses::internal
{
EXPECT_TRUE(getInput("foo", "paramInt32")->set(15));
EXPECT_TRUE(getInput("foo", "paramString")->set(std::string("Hello")));
- EXPECT_EQ(Result(), viewer.update());
+ EXPECT_EQ(Result(), viewer->update());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = rlogic.scripts.foo.OUT.struct.nested.data1.value..rlogic.scripts.foo.OUT.struct.nested.data2.value
+ R.logic().scripts.foo.IN.paramString.value = R.logic().scripts.foo.OUT.struct.nested.data1.value..R.logic().scripts.foo.OUT.struct.nested.data2.value
)"));
EXPECT_EQ("Hello15", getInput("foo", "paramString")->get().value());
}
@@ -506,7 +536,7 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, outputPropertyToString)
{
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = tostring(rlogic.scripts.foo.OUT.paramInt32)
+ R.logic().scripts.foo.IN.paramString.value = tostring(R.logic().scripts.foo.OUT.paramInt32)
)"));
EXPECT_EQ("Property: paramInt32", getInput("foo", "paramString")->get().value());
}
@@ -514,7 +544,7 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, inputPropertyToString)
{
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = tostring(rlogic.scripts.foo.IN.paramInt32)
+ R.logic().scripts.foo.IN.paramString.value = tostring(R.logic().scripts.foo.IN.paramInt32)
)"));
EXPECT_EQ("Property: paramInt32", getInput("foo", "paramString")->get().value());
}
@@ -522,15 +552,15 @@ namespace ramses::internal
TEST_F(ALogicViewerLua, nodeToString)
{
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.scripts.foo.IN.paramString.value = tostring(rlogic.scripts.foo)
+ R.logic().scripts.foo.IN.paramString.value = tostring(R.logic().scripts.foo)
)"));
EXPECT_EQ("LogicNode: foo", getInput("foo", "paramString")->get().value());
}
TEST_F(ALogicViewerLua, invalidView)
{
- EXPECT_EQ(0u, viewer.getViewCount());
- auto view = viewer.getView(0u);
+ EXPECT_EQ(0u, viewer->getViewCount());
+ auto view = viewer->getView(0u);
EXPECT_FALSE(view.isValid());
EXPECT_EQ("", view.name());
EXPECT_EQ("", view.description());
@@ -542,9 +572,9 @@ namespace ramses::internal
{
const Result ok;
auto* property = getInput("foo", "paramInt32");
- EXPECT_EQ(0u, viewer.getViewCount());
- EXPECT_FALSE(viewer.getView(0u).isValid());
- EXPECT_FALSE(viewer.getView(1u).isValid());
+ EXPECT_EQ(0u, viewer->getViewCount());
+ EXPECT_FALSE(viewer->getView(0u).isValid());
+ EXPECT_FALSE(viewer->getView(1u).isValid());
EXPECT_EQ(0, property->get().value());
EXPECT_EQ(ok, loadLua(R"(
@@ -552,23 +582,23 @@ namespace ramses::internal
name = "Default View",
description = "Description for the default view",
update = function(time_ms)
- rlogic.interfaces.foo.IN.paramInt32.value = 1773
+ R.logic().interfaces.foo.IN.paramInt32.value = 1773
end
}
- rlogic.views = {defaultView}
+ R.views = {defaultView}
)"));
- EXPECT_EQ(1u, viewer.getViewCount());
- EXPECT_EQ(1u, viewer.getCurrentView());
- auto view = viewer.getView(1u);
+ EXPECT_EQ(1u, viewer->getViewCount());
+ EXPECT_EQ(1u, viewer->getCurrentView());
+ auto view = viewer->getView(1u);
EXPECT_TRUE(view.isValid());
EXPECT_EQ("Default View", view.name());
EXPECT_EQ("Description for the default view", view.description());
EXPECT_EQ(0u, view.getInputCount());
EXPECT_EQ(nullptr, view.getInput(0u));
- EXPECT_EQ(ok, viewer.update());
+ EXPECT_EQ(ok, viewer->update());
EXPECT_EQ(1773, property->get().value());
}
@@ -579,7 +609,7 @@ namespace ramses::internal
name = "View with missing update() function",
}
- rlogic.views = {defaultView}
+ R.views = {defaultView}
)").getMessage(), testing::HasSubstr("update() function is missing for current view"));
}
@@ -593,7 +623,7 @@ namespace ramses::internal
end
}
- rlogic.views = {defaultView}
+ R.views = {defaultView}
)").getMessage(), testing::HasSubstr("view error during update"));
}
@@ -609,15 +639,15 @@ namespace ramses::internal
description = "View with 1 user input",
update = function(time_ms)
end,
- inputs = {rlogic.interfaces.foo.IN.paramInt32}
+ inputs = {R.logic().interfaces.foo.IN.paramInt32}
}
- rlogic.views = {defaultView}
+ R.views = {defaultView}
)"));
- EXPECT_EQ(1u, viewer.getViewCount());
- EXPECT_EQ(1u, viewer.getCurrentView());
- auto view = viewer.getView(1u);
+ EXPECT_EQ(1u, viewer->getViewCount());
+ EXPECT_EQ(1u, viewer->getCurrentView());
+ auto view = viewer->getView(1u);
EXPECT_TRUE(view.isValid());
EXPECT_EQ("View1", view.name());
EXPECT_EQ("View with 1 user input", view.description());
@@ -641,8 +671,8 @@ namespace ramses::internal
update = function(time_ms)
end,
inputs = {
- rlogic.interfaces.foo.IN.paramInt32,
- rlogic.scripts.foo.IN.paramString,
+ R.logic().interfaces.foo.IN.paramInt32,
+ R.logic().scripts.foo.IN.paramString,
}
}
@@ -650,16 +680,16 @@ namespace ramses::internal
name = "View2",
description = "View2 with no inputs",
update = function(time_ms)
- rlogic.interfaces.foo.IN.paramInt32.value = 1773
+ R.logic().interfaces.foo.IN.paramInt32.value = 1773
end,
}
- rlogic.views = {view1, view2}
+ R.views = {view1, view2}
)"));
- EXPECT_EQ(2u, viewer.getViewCount());
- EXPECT_EQ(1u, viewer.getCurrentView());
- auto view1 = viewer.getView(1u);
+ EXPECT_EQ(2u, viewer->getViewCount());
+ EXPECT_EQ(1u, viewer->getCurrentView());
+ auto view1 = viewer->getView(1u);
EXPECT_TRUE(view1.isValid());
EXPECT_EQ("View1", view1.name());
EXPECT_EQ("View1 with 2 user inputs", view1.description());
@@ -667,18 +697,18 @@ namespace ramses::internal
EXPECT_EQ(property1, view1.getInput(0u));
EXPECT_EQ(property2, view1.getInput(1u));
- EXPECT_EQ(ok, viewer.update());
+ EXPECT_EQ(ok, viewer->update());
EXPECT_EQ(0, property1->get().value());
- viewer.setCurrentView(2u);
+ viewer->setCurrentView(2u);
- EXPECT_EQ(2u, viewer.getCurrentView());
- auto view2 = viewer.getView(2u);
+ EXPECT_EQ(2u, viewer->getCurrentView());
+ auto view2 = viewer->getView(2u);
EXPECT_EQ("View2", view2.name());
EXPECT_EQ("View2 with no inputs", view2.description());
EXPECT_EQ(0u, view2.getInputCount());
- EXPECT_EQ(ok, viewer.update());
+ EXPECT_EQ(ok, viewer->update());
EXPECT_EQ(1773, property1->get().value());
}
@@ -689,20 +719,20 @@ namespace ramses::internal
EXPECT_EQ(ok, loadLua(R"(
function f1()
- rlogic.interfaces.foo.IN.paramInt32.value = -91
+ R.logic().interfaces.foo.IN.paramInt32.value = -91
end
function f2()
- rlogic.interfaces.foo.IN.paramInt32.value = 908
+ R.logic().interfaces.foo.IN.paramInt32.value = 908
end
)"));
EXPECT_EQ(0, property1->get().value());
- EXPECT_EQ(ok, viewer.call("f1"));
+ EXPECT_EQ(ok, viewer->call("f1"));
EXPECT_EQ(-91, property1->get().value());
- EXPECT_EQ(ok, viewer.call("f2"));
+ EXPECT_EQ(ok, viewer->call("f2"));
EXPECT_EQ(908, property1->get().value());
- EXPECT_THAT(viewer.call("fNotExisting").getMessage(), testing::StartsWith("attempt to call a nil value"));
+ EXPECT_THAT(viewer->call("fNotExisting").getMessage(), testing::StartsWith("attempt to call a nil value"));
}
TEST_F(ALogicViewerLua, screenshot)
@@ -711,7 +741,7 @@ namespace ramses::internal
MockScreenshot mock;
EXPECT_CALL(mock, screenshot("foo.png"));
EXPECT_EQ(ok, loadLua(R"(
- rlogic.screenshot("foo.png")
+ R.screenshot("foo.png")
)"));
}
@@ -720,7 +750,7 @@ namespace ramses::internal
EXPECT_TRUE(getInput("foo", "paramInt32")->set(static_cast(43)));
EXPECT_EQ(0, getOutput("foo", "paramInt32")->get());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.update()
+ R.logic().update()
)"));
EXPECT_EQ(86, getOutput("foo", "paramInt32")->get());
}
@@ -737,7 +767,7 @@ namespace ramses::internal
EXPECT_FALSE(out->hasOutgoingLink());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.link(rlogic.scripts.foo.OUT.paramInt64, rlogic.timerNodes.foo.IN.ticker_us)
+ R.logic().link(R.logic().scripts.foo.OUT.paramInt64, R.logic().timerNodes.foo.IN.ticker_us)
)"));
EXPECT_TRUE(in->isLinked());
@@ -748,7 +778,7 @@ namespace ramses::internal
EXPECT_TRUE(out->hasOutgoingLink());
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.unlink(rlogic.scripts.foo.OUT.paramInt64, rlogic.timerNodes.foo.IN.ticker_us)
+ R.logic().unlink(R.logic().scripts.foo.OUT.paramInt64, R.logic().timerNodes.foo.IN.ticker_us)
)"));
EXPECT_FALSE(in->isLinked());
EXPECT_FALSE(in->hasIncomingLink());
@@ -762,7 +792,7 @@ namespace ramses::internal
{
auto* translation = getInput("foo", "translation");
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.nodeBindings.foo.IN.translation.value = {1,2,3}
+ R.logic().nodeBindings.foo.IN.translation.value = {1,2,3}
)"));
EXPECT_FLOAT_EQ(1.f, translation->get().value()[0]);
EXPECT_FLOAT_EQ(2.f, translation->get().value()[1]);
@@ -776,7 +806,7 @@ namespace ramses::internal
unlinkInput(*floatUniform);
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.appearanceBindings.foo.IN.floatUniform.value = 9.1
+ R.logic().appearanceBindings.foo.IN.floatUniform.value = 9.1
)"));
EXPECT_FLOAT_EQ(9.1f, floatUniform->get().value());
}
@@ -785,7 +815,7 @@ namespace ramses::internal
{
auto* frustum = getInput("foo", "frustum");
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.cameraBindings.foo.IN.frustum.nearPlane.value = 0.93
+ R.logic().cameraBindings.foo.IN.frustum.nearPlane.value = 0.93
)"));
EXPECT_FLOAT_EQ(0.93f, frustum->getChild("nearPlane")->get().value());
}
@@ -794,7 +824,7 @@ namespace ramses::internal
{
auto* renderOrder = getInput("foo", "renderOrder");
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.renderPassBindings.foo.IN.renderOrder.value = 42
+ R.logic().renderPassBindings.foo.IN.renderOrder.value = 42
)"));
EXPECT_EQ(42, renderOrder->get().value());
}
@@ -806,7 +836,7 @@ namespace ramses::internal
unlinkInput(*renderOrder);
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.renderGroupBindings.rg.IN.renderOrders.nestedRG.value = 42
+ R.logic().renderGroupBindings.rg.IN.renderOrders.nestedRG.value = 42
)"));
EXPECT_EQ(42, renderOrder->get().value());
}
@@ -821,10 +851,10 @@ namespace ramses::internal
unlinkInput(*vertexOffset);
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.meshNodeBindings.mn.IN.vertexOffset.value = 42
- rlogic.meshNodeBindings.mn.IN.indexOffset.value = 43
- rlogic.meshNodeBindings.mn.IN.indexCount.value = 44
- rlogic.meshNodeBindings.mn.IN.instanceCount.value = 45
+ R.logic().meshNodeBindings.mn.IN.vertexOffset.value = 42
+ R.logic().meshNodeBindings.mn.IN.indexOffset.value = 43
+ R.logic().meshNodeBindings.mn.IN.indexCount.value = 44
+ R.logic().meshNodeBindings.mn.IN.instanceCount.value = 45
)"));
EXPECT_EQ(42, vertexOffset->get().value());
EXPECT_EQ(43, indexOffset->get().value());
@@ -841,9 +871,9 @@ namespace ramses::internal
unlinkInput(*width);
EXPECT_EQ(Result(), loadLua(R"(
- rlogic.renderBufferBindings.rb.IN.width.value = 42
- rlogic.renderBufferBindings.rb.IN.height.value = 43
- rlogic.renderBufferBindings.rb.IN.sampleCount.value = 44
+ R.logic().renderBufferBindings.rb.IN.width.value = 42
+ R.logic().renderBufferBindings.rb.IN.height.value = 43
+ R.logic().renderBufferBindings.rb.IN.sampleCount.value = 44
)"));
EXPECT_EQ(42, width->get().value());
EXPECT_EQ(43, height->get().value());
@@ -854,7 +884,7 @@ namespace ramses::internal
{
auto* ticker = getInput