Skip to content

Commit

Permalink
Oss release 28.0.0-rc2 created 2023-10-20-10-15
Browse files Browse the repository at this point in the history
see CHANGELOG.md for details

Original commit sha: c637fefbd3b7c1a3ab00c4b7d0272263583925f2

Co-authored-by: Askanaz Torosyan <[email protected]>
Co-authored-by: Daniel Haas <[email protected]>
Co-authored-by: Mirko Sova <[email protected]>
Co-authored-by: Violin Yanev <[email protected]>
Co-authored-by: Carsten Rohn <[email protected]>
Co-authored-by: Tobias Hammer <[email protected]>
Co-authored-by: Bernhard Kisslinger <[email protected]>
Co-authored-by: Martin Veith <[email protected]>
Co-authored-by: Jonathan Conrad <[email protected]>
Co-authored-by: Mohamed Sharaf-El-Deen <[email protected]>
Co-authored-by: Markus Keppler <[email protected]>
Co-authored-by: Chan Tong Yan <[email protected]>
Signed-off-by: Ramses Tech User <[email protected]>
  • Loading branch information
13 people committed Oct 20, 2023
1 parent 6ab0c63 commit b17da5f
Show file tree
Hide file tree
Showing 94 changed files with 1,837 additions and 1,643 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Ramses Changelog

28.0.0-rc2
Expand All @@ -23,7 +22,11 @@

### 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()
- 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
Expand Down Expand Up @@ -92,6 +95,10 @@
- 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 ramses::EClearFlags to ramses::EClearFlag
- Renamed standalone renderer executable to `ramses-renderer-standalone`
- Renamed `ERamsesObjectType::ArrayBufferObject` to `ERamsesObjectType::ArrayBuffer` to match the class name
Expand Down
2 changes: 1 addition & 1 deletion external/flatbuffers
Submodule flatbuffers updated 1697 files
2 changes: 1 addition & 1 deletion external/google-benchmark
Submodule google-benchmark updated 167 files
26 changes: 11 additions & 15 deletions include/ramses/client/Scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ namespace ramses

/**
* @brief Get an object from the scene by name
* Note that this will not find #ramses::LogicObject instances created from #ramses::LogicEngine,
* use #ramses::LogicEngine::findObject for those.
* This will also search for logic objects in all existing #ramses::LogicEngine instances if used with #ramses::SceneObject or #ramses::LogicObject template type,
* however to search for a concrete logic type (e.g. #ramses::LuaScript) use #ramses::LogicEngine::findObject instead.
* Note that giving a concrete object template type might result in faster search because it is limited to only objects of that type.
*
* @param[in] name The name of the object to get.
Expand All @@ -286,6 +286,8 @@ namespace ramses

/**
* @brief Get an object from the scene by id
* This will also search for logic objects in all existing #ramses::LogicEngine instances if used with #ramses::SceneObject or #ramses::LogicObject template type,
* however to search for a concrete logic type (e.g. #ramses::LuaScript) use #ramses::LogicEngine::findObject instead.
*
* @param[in] id The id of the object to get.
* @return Pointer to the object if found and convertible to the demanded type, nullptr otherwise.
Expand Down Expand Up @@ -540,8 +542,7 @@ namespace ramses
* @param[in] format Pixel format of the Texture2D data.
* @param[in] width Width of the texture (mipmap level 0).
* @param[in] height Height of the texture (mipmap level 0).
* @param[in] mipMapCount Number of mipmap levels contained in mipLevelData array.
* @param[in] mipLevelData Array of #ramses::MipLevelData structs defining mipmap levels
* @param[in] mipLevelData Vector of #ramses::MipLevelData structs defining mipmap levels
* to use. Amount and sizes of supplied mipmap levels have to
* conform to GL specification. Order is lowest level (biggest
* resolution) to highest level (smallest resolution).
Expand All @@ -555,8 +556,7 @@ namespace ramses
ETextureFormat format,
uint32_t width,
uint32_t height,
size_t mipMapCount,
const MipLevelData mipLevelData[], // NOLINT(modernize-avoid-c-arrays)
const std::vector<MipLevelData>& mipLevelData,
bool generateMipChain = false,
const TextureSwizzle& swizzle = {},
std::string_view name = {});
Expand All @@ -569,8 +569,7 @@ namespace ramses
* @param[in] width Width of the texture (mipmap level 0).
* @param[in] height Height of the texture (mipmap level 0).
* @param[in] depth Depth of the texture.
* @param[in] mipMapCount Number of mipmap levels contained in mipLevelData array.
* @param[in] mipLevelData Array of #ramses::MipLevelData structs defining mipmap levels
* @param[in] mipLevelData Vector of #ramses::MipLevelData structs defining mipmap levels
* to use. Amount and sizes of supplied mipmap levels have to
* conform to GL specification. Order is lowest level (biggest
* resolution) to highest level (smallest resolution).
Expand All @@ -583,8 +582,7 @@ namespace ramses
uint32_t width,
uint32_t height,
uint32_t depth,
size_t mipMapCount,
const MipLevelData mipLevelData[], // NOLINT(modernize-avoid-c-arrays)
const std::vector<MipLevelData>& mipLevelData,
bool generateMipChain = false,
std::string_view name = {});

Expand All @@ -594,8 +592,7 @@ namespace ramses
*
* @param[in] format Pixel format of the Cube Texture data.
* @param[in] size edge length of one quadratic cube face, belonging to the texture.
* @param[in] mipMapCount Number of mipmaps contained in mipLevelData array.
* @param[in] mipLevelData Array of MipLevelData structs defining mipmap levels
* @param[in] mipLevelData Vector of MipLevelData structs defining mipmap levels
* to use. Amount and sizes of supplied mipmap levels have to
* conform to GL specification. Order ist lowest level (biggest
* resolution) to highest level (smallest resolution).
Expand All @@ -607,8 +604,7 @@ namespace ramses
TextureCube* createTextureCube(
ETextureFormat format,
uint32_t size,
size_t mipMapCount,
const CubeMipLevelData mipLevelData[], // NOLINT(modernize-avoid-c-arrays)
const std::vector<CubeMipLevelData>& mipLevelData,
bool generateMipChain = false,
const TextureSwizzle& swizzle = {},
std::string_view name = {});
Expand Down Expand Up @@ -937,6 +933,6 @@ namespace ramses
void Scene::StaticTypeCheck()
{
static_assert(std::is_base_of_v<SceneObject, T>, "Type not derived from SceneObject or undefined! Make sure you include the header for the target type class.");
static_assert(!std::is_base_of_v<LogicObject, T>, "To find logic objects use LogicEngine::findObject.");
static_assert(!std::is_base_of_v<LogicObject, T> || std::is_same_v<LogicObject, T>, "To find concrete types derived from LogicObject use LogicEngine::findObject.");
}
}
2 changes: 1 addition & 1 deletion scripts/code_style_checker/check_all_styles.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# -------------------------------------------------------------------------
# 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# -------------------------------------------------------------------------
# Copyright (C) 2013 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
Expand Down
2 changes: 1 addition & 1 deletion scripts/code_style_checker/check_enum_style.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# -------------------------------------------------------------------------
# Copyright (C) 2013 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
Expand Down
2 changes: 1 addition & 1 deletion scripts/code_style_checker/check_header_guards.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# -------------------------------------------------------------------------
# Copyright (C) 2013 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
Expand Down
2 changes: 1 addition & 1 deletion scripts/code_style_checker/check_last_line_newline.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# -------------------------------------------------------------------------
# Copyright (C) 2013 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
Expand Down
30 changes: 15 additions & 15 deletions scripts/code_style_checker/check_license.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# -------------------------------------------------------------------------
# Copyright (C) 2013 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
Expand All @@ -20,23 +20,23 @@
]

# generate license regexes only once
G_RE_LICENSE_TEMPLATE_OPEN = re.compile(r"""(?://|::|#| ) -------------------------------------------------------------------------
G_RE_LICENSE_TEMPLATE_OPEN = re.compile(r"""(?://|::|#|%%| ) -------------------------------------------------------------------------
(?://|::|#| ) Copyright \(C\) 2\d{3}(?:-2\d{3})?(?: BMW AG| BMW Car IT GmbH|, Garmin International, Inc\. and its affiliates\.)$(?:\n(?://|::|#) Copyright \(C\) .*$)*
(?://|::|#| ) -------------------------------------------------------------------------
(?://|::|#| ) 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/\.
(?://|::|#| ) -------------------------------------------------------------------------
(?://|::|#|%%| ) -------------------------------------------------------------------------
(?://|::|#|%%| ) 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/\.
(?://|::|#|%%| ) -------------------------------------------------------------------------
""", re.MULTILINE) # noqa E501 allow long lines here

G_RE_LICENSE_TEMPLATE_PROP = re.compile(r"""(?://|::|#) -------------------------------------------------------------------------
(?://|::|#) Copyright \(C\) 2\d{3}(?:-2\d{3})? (BMW AG|BMW Car IT GmbH)
(?://|::|#) All rights reserved\.
(?://|::|#) -------------------------------------------------------------------------
(?://|::|#) This document contains proprietary information belonging to (\1)(\.)
(?://|::|#) Passing on and copying of this document, use and communication of its
(?://|::|#) contents is not permitted without prior written authorization\.
(?://|::|#) -------------------------------------------------------------------------
G_RE_LICENSE_TEMPLATE_PROP = re.compile(r"""(?://|::|#|%%) -------------------------------------------------------------------------
(?://|::|#|%%) Copyright \(C\) 2\d{3}(?:-2\d{3})? (BMW AG|BMW Car IT GmbH)
(?://|::|#|%%) All rights reserved\.
(?://|::|#|%%) -------------------------------------------------------------------------
(?://|::|#|%%) This document contains proprietary information belonging to (\1)(\.)
(?://|::|#|%%) Passing on and copying of this document, use and communication of its
(?://|::|#|%%) contents is not permitted without prior written authorization\.
(?://|::|#|%%) -------------------------------------------------------------------------
""", re.MULTILINE)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# -------------------------------------------------------------------------
# Copyright (C) 2013 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# -------------------------------------------------------------------------
# Copyright (C) 2013 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
Expand Down
2 changes: 1 addition & 1 deletion scripts/code_style_checker/check_tabbing_and_spacing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# -------------------------------------------------------------------------
# Copyright (C) 2013 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
Expand Down
2 changes: 1 addition & 1 deletion scripts/code_style_checker/common_modules/common.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -------------------------------------------------------------------------
# Copyright (C) 2013 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
Expand Down
14 changes: 7 additions & 7 deletions src/client/impl/RamsesClientImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,16 +760,16 @@ namespace ramses::internal
ramses::internal::ManagedResource RamsesClientImpl::createManagedTexture(ramses::internal::EResourceType textureType,
uint32_t width, uint32_t height, uint32_t depth,
ETextureFormat format,
uint32_t mipMapCount, const MipDataStorageType mipLevelData[], bool generateMipChain, // NOLINT(modernize-avoid-c-arrays)
const std::vector<MipDataStorageType>& mipLevelData, bool generateMipChain,
const TextureSwizzle& swizzle, std::string_view name)
{
if (!TextureUtils::TextureParametersValid(width, height, depth, mipMapCount) || !TextureUtils::MipDataValid(width, height, depth, mipMapCount, mipLevelData, format))
if (!TextureUtils::TextureParametersValid(width, height, depth, static_cast<uint32_t>(mipLevelData.size())) || !TextureUtils::MipDataValid(width, height, depth, mipLevelData, format))
{
LOG_ERROR(ramses::internal::CONTEXT_CLIENT, "RamsesClient::createTexture: invalid parameters");
return {};
}

if (generateMipChain && (!FormatSupportsMipChainGeneration(format) || (mipMapCount > 1)))
if (generateMipChain && (!FormatSupportsMipChainGeneration(format) || (mipLevelData.size() > 1)))
{
LOG_WARN(ramses::internal::CONTEXT_CLIENT, "RamsesClient::createTexture: cannot auto generate mipmaps when custom mipmap data provided or unsupported format used");
generateMipChain = false;
Expand All @@ -782,22 +782,22 @@ namespace ramses::internal
texDesc.m_format = TextureUtils::GetTextureFormatInternal(format);
texDesc.m_generateMipChain = generateMipChain;
texDesc.m_swizzle = TextureUtils::GetTextureSwizzleInternal(swizzle);
TextureUtils::FillMipDataSizes(texDesc.m_dataSizes, mipMapCount, mipLevelData);
TextureUtils::FillMipDataSizes(texDesc.m_dataSizes, mipLevelData);

auto* resource = new ramses::internal::TextureResource(textureType, texDesc, name);
TextureUtils::FillMipData(const_cast<std::byte*>(resource->getResourceData().data()), mipMapCount, mipLevelData);
TextureUtils::FillMipData(const_cast<std::byte*>(resource->getResourceData().data()), mipLevelData);

return manageResource(resource);
}
template ramses::internal::ManagedResource RamsesClientImpl::createManagedTexture(ramses::internal::EResourceType textureType,
uint32_t width, uint32_t height, uint32_t depth,
ETextureFormat format,
uint32_t mipMapCount, const MipLevelData mipLevelData[], bool generateMipChain,
const std::vector<MipLevelData>& mipLevelData, bool generateMipChain,
const TextureSwizzle& swizzle, std::string_view name);
template ramses::internal::ManagedResource RamsesClientImpl::createManagedTexture(ramses::internal::EResourceType textureType,
uint32_t width, uint32_t height, uint32_t depth,
ETextureFormat format,
uint32_t mipMapCount, const CubeMipLevelData mipLevelData[], bool generateMipChain,
const std::vector<CubeMipLevelData>& mipLevelData, bool generateMipChain,
const TextureSwizzle& swizzle, std::string_view name);

ramses::internal::ManagedResource RamsesClientImpl::createManagedEffect(const EffectDescription& effectDesc, std::string_view name, std::string& errorMessages)
Expand Down
4 changes: 2 additions & 2 deletions src/client/impl/RamsesClientImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ namespace ramses::internal

// NOLINTNEXTLINE(modernize-avoid-c-arrays)
ramses::internal::ManagedResource createManagedArrayResource(uint32_t numElements, ramses::EDataType type, const void* arrayData, std::string_view name);
template <typename MipDataStorageType> // NOLINTNEXTLINE(modernize-avoid-c-arrays)
ramses::internal::ManagedResource createManagedTexture(ramses::internal::EResourceType textureType, uint32_t width, uint32_t height, uint32_t depth, ETextureFormat format, uint32_t mipMapCount, const MipDataStorageType mipLevelData[], bool generateMipChain, const TextureSwizzle& swizzle, std::string_view name);
template <typename MipDataStorageType>
ramses::internal::ManagedResource createManagedTexture(ramses::internal::EResourceType textureType, uint32_t width, uint32_t height, uint32_t depth, ETextureFormat format, const std::vector<MipDataStorageType>& mipLevelData, bool generateMipChain, const TextureSwizzle& swizzle, std::string_view name);
ramses::internal::ManagedResource createManagedEffect(const EffectDescription& effectDesc, std::string_view name, std::string& errorMessages);

void writeLowLevelResourcesToStream(const ResourceObjects& resources, ramses::internal::IOutputStream& resourceOutputStream, bool compress) const;
Expand Down
Loading

0 comments on commit b17da5f

Please sign in to comment.