Methane Kit v0.7.1 #115
egorodet
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a refactoring release which replaces monolithic "Graphics Core" module with modular RHI (Rendering Hardware Interface) consisting of interfaces, base implementation, DirectX, Vulkan, Metal and Null backend modules and new "Impl" module with PIMPL classes providing convenient way to use RHI with an extra performance boost from inlining API calls directly to final implementation, instead of virtual calls made through abstract interfaces. See performance comparison of FPS in Methane Asteroids benchmark with 3 implementations (all compiled with the same updated compiler optimization flags): v0.7.0 RHI virtual interfaces, v0.7.1 RHI PIMPL classes without inlining and with inline calls to final implementation. All tutorials, graphics primitives and user interface classes were rewritten to use RHI PIMPL classes, which allow to reduce code complexity and improve readability.
Graphics libraries
Modules/Graphics/RHI/Impl
). PIMPL classes are more convenient to use since they allow to write code without smart pointers and allow to get more performance with final implementation inlining. CMake optionMETHANE_RHI_PIMPL_INLINE_ENABLED
enables RHI final implementation inlining for PIMPL classes and allows to make direct calls to final RHI implementation without virtual call overhead. PIMPL inlining can gives up to 5% of extra performance in highly loaded rendering scenario.Graphics Core
module was renamed toGraphics RHI
(RHI is a common acronym for Rendering Hardware Interface) and split into several CMake modulesInterface
,Base
,DirectX
,Vulkan
,Metal
andImpl
- this makes architecture even more modular and extensible.I
prefix in file and struct names and put underMethane::Graphics::Rhi
namespace, for exampleGraphics::Device
->Graphics::Rhi::IDevice
.Graphics::DeviceBase
->Graphics::Base::Device
,Graphics::DeviceDX
->Graphics::DirectX::Device
. Source files were renamed accordingly:Graphics/DeviceBase.h
->Graphics/Base/Device.h
,Graphics/DeviceDX.h
->Graphics/DirectX/Device.h
. This allows to mirror RHI implementations for different APIs with completely symmetrical classes and files naming inside different namespaces.Create
static factory functions ofITexture
andIBuffer
interfaces using custom setting initialisers.CreateX
virtual methods in RHI interfaces and use them in implementation ofX::Create
static factory functions.BLITCommandList
was renamed toTransferCommandList
.QueryBuffer
was renamed toQueryPool
.std::string
withstd::string_view
inIObject::SetName
andGetName
methods.Buffer
andTexture
classes for Vulkan and DirectX APIs by replacing template class variants with common class implementation.ImageLoader
,ScreenQuad
andSkyBox
to use RHI PIMPL classes instead abstract interfaces and implemented themself in PIMPL style.Primitives
modules were moved insideRHI
submodules:Windows/DirectXErrorHandling.h
toRHI/DirectX
module and renamed toErrorHandling.h
.FpsCounter.h
and split to interface and implementation toRHI/Interfaces
andRHI/Base
modules.User Interface
Font
,Text
andBadge
classes to RHI PIMPL classes instead of abstract interfaces and implemented themself in PIMPL style.Platform libraries
Platform/Input
module was split into to submodules:Keyboard
,Mouse
,Controllers
andActionControllers
. All classes from this modules were moved underPlatform::Input
namespace.Data libraries
Data::EnumMask<EnumType>
template class implementing bit-mask operations on enum values used as bits.EnumMask
type is used in Methane Kit public interfaces instead ofmagic_enum::bitwise_operators
.Data::Transmitter<ICallbackType>
class which implementsData::IEmitter
by transmitting callback connections to some other emitter instance.External libraries
d3dx12.h
in DirectX RHI.Tutorials applications
Tests
Data/EnumMask.hpp
.Data/EnumMaskUtils.hpp
.Data/Transmitter.hpp
Builds
sonarcloud-github-c-cpp
to install scanner binaries.build-wrapper
tool is not used anymore, it was replaced with Ninja compilation data base generated by CMake.Documentation
Release CI Runs
This discussion was created from the release Methane Kit v0.7.1.
Beta Was this translation helpful? Give feedback.
All reactions