Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 28.0.0-rc3. #114

Merged
merged 5 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ jobs:
cmake_args+=" -Dramses-sdk_ENABLE_DEFAULT_WINDOW_TYPE=OFF"
cmake_args+=" -Dramses-sdk_BUILD_FULL_SHARED_LIB=OFF"
cmake_args+=" -Dramses-sdk_BUILD_HEADLESS_SHARED_LIB=ON"
# temporarily disable building tests for MacOS platform
cmake_args+=" -Dramses-sdk_BUILD_TESTS=OFF"
fi

if [[ "${{matrix.target-platform}}" == "iphone"* ]]; then
Expand Down
44 changes: 33 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Ramses Changelog

28.0.0-rc3
-------------------
### Added <a name=28.0.0-rc3.Added></a>
- 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 <a name=28.0.0-rc3.Changed></a>
- 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 <a name=28.0.0-rc3.Removed></a>
- 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 <a name=28.0.0-rc2.Added></a>
Expand All @@ -10,7 +32,7 @@
- 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 guery EFeatureLevel
- Added `RamsesFramework::getFeatureLevel()` to easily query EFeatureLevel
- 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
Expand All @@ -22,27 +44,27 @@

### Changed <a name=28.0.0-rc2.Changed></a>

- Modernized mipLevelData from C-style array to vector for Scene::createTexture2D(), Scene::createTexture3D() and Scene::createTextureCube()
- 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 a SceneObject of type ERamsesObjectType::LogicEngine and its lifecycle is managed by Scene as for any other SceneObject. LogicEngine is no longer a movable type.
- removed scene argument from all loading functions in LogicEngine: loadFromFile, loadFromFileDescriptor, loadFromBuffer
- 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)
- 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
- LogicObject::set/getUserId moved to its base RamsesObject so any RamsesObject can use it now
- `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
- `LogicObject::set/getUserId` moved to its base RamsesObject so any RamsesObject can use it now
- 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*
- `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`
- `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`)
no longer inherit from StatusObject. Their methods also return `bool` but error messages are only logged (not tracked with `getLastError`).
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
- Changed default publishing mode of scenes from EScenePublicationMode::LocalAndRemote to EScenePublicationMode::LocalOnly
Expand All @@ -66,13 +88,13 @@
- Removed `EffectInput::isValid` because `UniformInput` and `AttributeInput` objects are always valid now
- Changed `EffectInput::getDataType` to return `EDataType` instead of `optional<EDataType>`
- 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 driver.
- 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<ramses::EClearFlag>`)
- 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 get built if the required
- 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<ramses::EKeyModifier>`)
- Moved `ramses-client-api/TextureEnums.h` to `ramses/framework/TextureEnums.h`
Expand Down
31 changes: 8 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "-rc2")
set(RAMSES_VERSION_POSTFIX "-rc3")
set(RAMSES_VERSION "${RAMSES_VERSION_MAJOR}.${RAMSES_VERSION_MINOR}.${RAMSES_VERSION_PATCH}${RAMSES_VERSION_POSTFIX}")

project(ramses-sdk
Expand Down Expand Up @@ -45,8 +45,7 @@ option(ramses-sdk_ENABLE_WINDOW_TYPE_WAYLAND_IVI "Enable building for Way
option(ramses-sdk_ENABLE_WINDOW_TYPE_WAYLAND_WL_SHELL "Enable building for Wayland wl_shell window" OFF)

# shared lib options
option(ramses-sdk_BUILD_FULL_SHARED_LIB "Build per-renderer shared libraries." ON)
option(ramses-sdk_BUILD_HEADLESS_SHARED_LIB "Enable building headless shared library without renderer" OFF)
option(ramses-sdk_BUILD_FULL_SHARED_LIB "Build full shared libraries (with renderer)." ON)

# optional components
option(ramses-sdk_ENABLE_LOGIC "Enable ramses logic - a component for scripting and animation." ON)
Expand Down Expand Up @@ -172,23 +171,13 @@ if(NOT ANY_WINDOW_TYPE_ENABLED)
elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
setDefaultWindowType(ramses-sdk_ENABLE_WINDOW_TYPE_IOS "iOS")
else()
message(WARNING "Incorrect configuration. No default window type is known for the build operating system '${CMAKE_SYSTEM_NAME}':\n"
message(WARNING "No default window type is known for the build operating system '${CMAKE_SYSTEM_NAME}':\n"
"* Either disable default window type by setting ramses-sdk_ENABLE_DEFAULT_WINDOW_TYPE=OFF\n"
"* or enable a window type explicitly by setting any of the options ramses-sdk_ENABLE_WINDOW_TYPE_* to ON\n"
"For current configuration ramses-sdk_BUILD_HEADLESS_SHARED_LIB will be overridden to ON, and headless shared lib will be built.")

# Override cmake option (with normal/non-cached cmake variable)
set(ramses-sdk_BUILD_HEADLESS_SHARED_LIB ON)
"* or enable a window type explicitly by setting any of the options ramses-sdk_ENABLE_WINDOW_TYPE_* to ON")
endif()
endif()
endif()

if(NOT ANY_WINDOW_TYPE_ENABLED AND NOT ramses-sdk_BUILD_HEADLESS_SHARED_LIB)
message(FATAL_ERROR "Invalid configuration. Neither any window type, nor headless shared lib enabled:\n"
"* Either enable at least one window type by setting any of the options ramses-sdk_ENABLE_WINDOW_TYPE_* to ON\n"
"* or enable building headless shared lib (without renderer) by setting ramses-sdk_BUILD_HEADLESS_SHARED_LIB=ON")
endif()

if(NOT ANY_WINDOW_TYPE_ENABLED AND ramses-sdk_BUILD_FULL_SHARED_LIB)
message(WARNING "Incorrect configuration. Trying to build full shared lib with renderer while no window type is enabled:\n"
"* If trying to build renderer enable at least one window type by setting any of the options ramses-sdk_ENABLE_WINDOW_TYPE_* to ON\n"
Expand Down Expand Up @@ -253,11 +242,10 @@ if(ramses-sdk_BUILD_TOOLS)
add_subdirectory(tools)
endif()

if(ramses-sdk_BUILD_FULL_SHARED_LIB OR ramses-sdk_BUILD_HEADLESS_SHARED_LIB)
if(ramses-sdk_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
if(ramses-sdk_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

if(ramses-sdk_BUILD_FULL_SHARED_LIB)
if(ramses-sdk_BUILD_DEMOS)
add_subdirectory(demo)
Expand All @@ -283,10 +271,7 @@ if(ramses-sdk_ENABLE_INSTALL)

include(CMakePackageConfigHelpers)

set(configmodules) # initially empty
if (ramses-sdk_BUILD_HEADLESS_SHARED_LIB)
list(APPEND configmodules ramses-shared-lib-headless)
endif()
list(APPEND configmodules ramses-shared-lib-headless)
if (ramses-sdk_BUILD_FULL_SHARED_LIB)
list(APPEND configmodules ramses-shared-lib)
endif()
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- RAMSES -->

# Table of Contents
* [What is RAMSES](#what-is-ramses)
* [Obtaining the source code](#obtaining-the-source-code)
* [Building and testing](#building-and-testing)
* [License](#license)
* <project:#what-is-ramses>
* <project:#obtaining-the-source-code>
* <project:#build-instructions>
* <project:#license>

# What is RAMSES

Expand Down Expand Up @@ -46,7 +46,7 @@ Building RAMSES on Linux with docker:
We prefer to build RAMSES in Docker because it abstracts the dependency installation
and the CMake invocations away from the user. Docker is installed slightly differently
on different distros, check the docker manual for your distro. The instructions below
are for Ubuntu 18.04 LTS:
are for Ubuntu 20.04 LTS:

```
apt install docker.io
Expand Down
3 changes: 2 additions & 1 deletion cmake/ramses/createTarget.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function(createModule)
set(LINK_VISIBILITY PUBLIC)
elseif("${MODULE_TYPE}" STREQUAL "OBJECT")
add_library(${MODULE_NAME} OBJECT ${GLOBBED_MODULE_SRC_FILES})
set(LINK_VISIBILITY PUBLIC)
elseif("${MODULE_TYPE}" STREQUAL "SHARED_LIBRARY")
add_library(${MODULE_NAME} SHARED ${GLOBBED_MODULE_SRC_FILES})

Expand Down Expand Up @@ -209,7 +210,7 @@ function(createModuleWithRenderer)
message(FATAL_ERROR "Unparsed createModuleWithRenderer properties: '${MODULE_UNPARSED_ARGUMENTS}'")
endif()

set(MODULE_DEPENDENCIES "ramses-renderer;ramses-build-options-base;${MODULE_DEPENDENCIES}")
set(MODULE_DEPENDENCIES "ramses-renderer;ramses-client;ramses-build-options-base;${MODULE_DEPENDENCIES}")

createModule(NAME ${MODULE_NAME}
TYPE ${MODULE_TYPE}
Expand Down
32 changes: 14 additions & 18 deletions cmake/templates/ramses-shared-libTemplate.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,27 @@ endif()

set(ramses-shared-lib_INCLUDE_DIRS "@PACKAGE_RAMSES_INSTALL_HEADERS_PATH@")

if(IS_DIRECTORY "${ramses-shared-lib_INCLUDE_DIRS}/glm")
add_library(glm::glm INTERFACE IMPORTED)
set_target_properties(glm::glm PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${ramses-shared-lib_INCLUDE_DIRS})
else()
find_dependency(glm REQUIRED)

if(NOT TARGET glm::glm)
add_library(glm::glm ALIAS glm)
endif()
endif()

# find library
IF(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")

# no shlib versioning support on windows
FIND_LIBRARY(ramses-shared-lib_LIBRARIES
FIND_LIBRARY(ramses-shared-lib_FULL_LIBRARIES
NAMES "ramses-shared-lib"
HINTS @PACKAGE_RAMSES_INSTALL_RUNTIME_PATH@
)

ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

# require exact shlib version
FIND_LIBRARY(ramses-shared-lib_LIBRARIES
FIND_LIBRARY(ramses-shared-lib_FULL_LIBRARIES
NAMES "libramses-shared-lib.so.@RAMSES_VERSION_MAJOR@.@RAMSES_VERSION_MINOR@"
HINTS @PACKAGE_RAMSES_INSTALL_LIBRARY_PATH@
)

ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Android")

# no shlib versioning support on Android
FIND_LIBRARY(ramses-shared-lib_LIBRARIES
FIND_LIBRARY(ramses-shared-lib_FULL_LIBRARIES
NAMES "libramses-shared-lib"
HINTS @PACKAGE_RAMSES_INSTALL_LIBRARY_PATH@
CMAKE_FIND_ROOT_PATH_BOTH
Expand All @@ -68,16 +57,22 @@ ELSE()
ENDIF()


# find headless to add as dependency
find_package(ramses-shared-lib-headless REQUIRED)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(ramses-shared-lib
FOUND_VAR ramses-shared-lib_FOUND
REQUIRED_VARS ramses-shared-lib_LIBRARIES ramses-shared-lib_INCLUDE_DIRS
REQUIRED_VARS ramses-shared-lib_FULL_LIBRARIES ramses-shared-lib-headless_LIBRARIES ramses-shared-lib_INCLUDE_DIRS
VERSION_VAR ramses-shared-lib_VERSION)

set(ramses-sdk_VERSION "@ramses-sdk_VERSION@" CACHE STRING "Ramses version" FORCE)

set(ramses-shared-lib_LIBRARIES ${ramses-shared-lib-headless_LIBRARIES} ${ramses-shared-lib_FULL_LIBRARIES})

message(STATUS "Found ramses-shared-lib libs: ${ramses-shared-lib_LIBRARIES}")
message(STATUS "Found ramses-shared-lib includes: ${ramses-shared-lib_INCLUDE_DIRS}")


MARK_AS_ADVANCED(
ramses-shared-lib_INCLUDE_DIRS
ramses-shared-lib_LIBRARIES
Expand All @@ -87,12 +82,13 @@ MARK_AS_ADVANCED(
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13")
if (NOT TARGET ramses-ramses-shared-lib)
add_library(ramses-ramses-shared-lib SHARED IMPORTED GLOBAL)
set_target_properties(ramses-ramses-shared-lib PROPERTIES IMPORTED_LOCATION ${ramses-shared-lib_LIBRARIES})
set_target_properties(ramses-ramses-shared-lib PROPERTIES IMPORTED_LOCATION ${ramses-shared-lib_FULL_LIBRARIES})

if (MSVC)
set_target_properties(ramses-ramses-shared-lib PROPERTIES IMPORTED_IMPLIB ${ramses-shared-lib_LIBRARIES})
set_target_properties(ramses-ramses-shared-lib PROPERTIES IMPORTED_IMPLIB ${ramses-shared-lib_FULL_LIBRARIES})
endif()
target_include_directories(ramses-ramses-shared-lib INTERFACE ${ramses-shared-lib_INCLUDE_DIRS})
target_link_libraries(ramses-ramses-shared-lib INTERFACE glm::glm)
target_link_libraries(ramses-ramses-shared-lib INTERFACE ramses::headless)

if (NOT TARGET ramses::ramses)
add_library(ramses::ramses ALIAS ramses-ramses-shared-lib)
Expand Down
5 changes: 0 additions & 5 deletions doc/sphinx/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ modify some of the build settings:
* default: ON
* Builds a version of the ramses shared library **with** renderer support. At least one window type must be enabled for build.

* -Dramses-sdk_BUILD_HEADLESS_SHARED_LIB
* options: ON/OFF
* default: OFF
* Builds a version of the ramses shared library **without** renderer support.


``Ramses`` needs (at least) one platform-specific window type to support rendering. Several window types can be included into one build (e.g. X11 and Wayland). By default one suitable window type will be auto-detected.
Build will fail if dependencies for an enabled window type are not found.
Expand Down
3 changes: 3 additions & 0 deletions doc/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
# Breathe options
breathe_default_project = "ramses"

# Myst options
myst_heading_anchors = 1

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/logic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ how many nodes were needed to be updated and if the topology could be improved s
to only the necessary nodes.

.. note::
An easy way to quickly get insight what happens inside a logic network is to use the :ref:`GUI viewer <ramses-logic-viewer>`.
An easy way to quickly get insight what happens inside a logic network is to use the :ref:`GUI viewer <ramses-viewer>`.
The viewer displays the stats reported by the :class:`ramses::LogicEngineReport` dynamically or statically over multiple
update cycles.

Expand Down
Loading