Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,24 @@ component_management:
- component_id: platform-utils
name: Platform Utils
paths:
- Modules/Platform/Utils/**
- Modules/Platform/*/Utils/**
- component_id: platform-input
name: Platform Input
paths:
- Modules/Platform/Input/**
- Modules/Platform/*/Input/**
- Modules/Platform/Apple/*/Input/**
- Tests/Platform/Input/**
- component_id: platform-app-view
name: Platform App-View
paths:
- Modules/Platform/AppView/**
- Modules/Platform/*/AppView/**
- Modules/Platform/Apple/*/AppView/**
- component_id: platform-app
name: Platform App
paths:
- Modules/Platform/App/**
- Modules/Platform/*/App/**
- Modules/Platform/Apple/*/App/**
- Modules/Platform/*/AppController/**
- component_id: graphics-types
name: Graphics Types
paths:
Expand Down
2 changes: 1 addition & 1 deletion Apps/01-HelloTriangle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The tutorial covers the following Methane Kit features and techniques:
## Application Controls

Common keyboard controls are enabled by the `Platform` and `Graphics` application controllers:
- [Methane::Platform::AppController](/Modules/Platform/App/README.md#platform-application-controller)
- [Methane::Platform::AppController](/Modules/Platform/Impl/App/README.md#platform-application-controller)
- [Methane::Graphics::AppController, AppContextController](/Modules/Graphics/App/README.md#graphics-application-controllers)

## Application and Frame Class Definitions
Expand Down
2 changes: 1 addition & 1 deletion Apps/02-HelloCube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The tutorial demonstrates the following Methane Kit features and techniques in a
## Application Controls

Common keyboard controls are enabled by the `Platform` and `Graphics` application controllers:
- [Methane::Platform::AppController](/Modules/Platform/App/README.md#platform-application-controller)
- [Methane::Platform::AppController](/Modules/Platform/Impl/App/README.md#platform-application-controller)
- [Methane::Graphics::AppController, AppContextController](/Modules/Graphics/App/README.md#graphics-application-controllers)

## Simple Cube Vertices Transformation on CPU
Expand Down
2 changes: 1 addition & 1 deletion Apps/03-TexturedCube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Tutorial demonstrates the following Methane Kit features in addition to those de
## Application Controls

Common keyboard controls are enabled by the `Platform`, `Graphics` and `UserInterface` application controllers:
- [Methane::Platform::AppController](/Modules/Platform/App/README.md#platform-application-controller)
- [Methane::Platform::AppController](/Modules/Platform/Impl/App/README.md#platform-application-controller)
- [Methane::Graphics::AppController, AppContextController](/Modules/Graphics/App/README.md#graphics-application-controllers)
- [Methane::UserInterface::AppController](/Modules/UserInterface/App/README.md#user-interface-application-controllers)

Expand Down
2 changes: 1 addition & 1 deletion Apps/04-ShadowCube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Tutorial demonstrates the use of the following Methane Kit features in addition
## Application Controls

Common keyboard controls are enabled by the `Platform`, `Graphics` and `UserInterface` application controllers:
- [Methane::Platform::AppController](/Modules/Platform/App/README.md#platform-application-controller)
- [Methane::Platform::AppController](/Modules/Platform/Impl/App/README.md#platform-application-controller)
- [Methane::Graphics::AppController, AppContextController](/Modules/Graphics/App/README.md#graphics-application-controllers)
- [Methane::UserInterface::AppController](/Modules/UserInterface/App/README.md#user-interface-application-controllers)

Expand Down
4 changes: 2 additions & 2 deletions Apps/05-Typography/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ characters and words. Right-to-left and Arabic language character layout is not
## Application Controls

Keyboard actions are enabled with [TypographyAppController](TypographyAppController.h) class
derived from [Platform::Input::Keyboard::ActionControllerBase](/Modules/Platform/Input/ActionControllers/Include/Methane/Platform/Input/KeyboardActionControllerBase.hpp):
derived from [Platform::Input::Keyboard::ActionControllerBase](/Modules/Platform/Base/Input/ActionControllers/Include/Methane/Platform/Input/KeyboardActionControllerBase.hpp):

| Typography App Action | Keyboard Shortcut |
|-----------------------------------------------------------------|-------------------|
Expand All @@ -29,7 +29,7 @@ derived from [Platform::Input::Keyboard::ActionControllerBase](/Modules/Platform
| Slowdown Typing | `-` |

Common keyboard controls are enabled by the `Platform`, `Graphics` and `UserInterface` application controllers:
- [Methane::Platform::AppController](/Modules/Platform/App/README.md#platform-application-controller)
- [Methane::Platform::AppController](/Modules/Platform/Impl/App/README.md#platform-application-controller)
- [Methane::Graphics::AppController, AppContextController](/Modules/Graphics/App/README.md#graphics-application-controllers)
- [Methane::UserInterface::AppController](/Modules/UserInterface/App/README.md#user-interface-application-controllers)

Expand Down
2 changes: 1 addition & 1 deletion Apps/06-CubeMapArray/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Tutorial demonstrates the following techniques:
## Application Controls

Common keyboard controls are enabled by the `Platform`, `Graphics` and `UserInterface` application controllers:
- [Methane::Platform::AppController](/Modules/Platform/App/README.md#platform-application-controller)
- [Methane::Platform::AppController](/Modules/Platform/Impl/App/README.md#platform-application-controller)
- [Methane::Graphics::AppController, AppContextController](/Modules/Graphics/App/README.md#graphics-application-controllers)
- [Methane::UserInterface::AppController](/Modules/UserInterface/App/README.md#user-interface-application-controllers)

Expand Down
4 changes: 2 additions & 2 deletions Apps/07-ParallelRendering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Tutorial demonstrates the following techniques:
## Application Controls

Keyboard actions are enabled with [ParallelRenderingAppController](ParallelRenderingAppController.h) class
derived from [Platform::Input::Keyboard::ActionControllerBase](/Modules/Platform/Input/ActionControllers/Include/Methane/Platform/Input/KeyboardActionControllerBase.hpp):
derived from [Platform::Input::Keyboard::ActionControllerBase](/Modules/Platform/Base/Input/ActionControllers/Include/Methane/Platform/Input/KeyboardActionControllerBase.hpp):

| Parallel Rendering App Action | Keyboard Shortcut |
|-------------------------------|-------------------|
Expand All @@ -41,7 +41,7 @@ derived from [Platform::Input::Keyboard::ActionControllerBase](/Modules/Platform
| Decrease Render Threads Count | `[` |

Common keyboard controls are enabled by the `Platform`, `Graphics` and `UserInterface` application controllers:
- [Methane::Platform::AppController](/Modules/Platform/App/README.md#platform-application-controller)
- [Methane::Platform::AppController](/Modules/Platform/Impl/App/README.md#platform-application-controller)
- [Methane::Graphics::AppController, AppContextController](/Modules/Graphics/App/README.md#graphics-application-controllers)
- [Methane::UserInterface::AppController](/Modules/UserInterface/App/README.md#user-interface-application-controllers)

Expand Down
2 changes: 1 addition & 1 deletion Modules/Graphics/App/Include/Methane/Graphics/AppBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class AppBase // NOSONAR
void CompleteInitialization() const;
void WaitForRenderComplete() const;

// Platform::AppBase interface
// Platform::Base::App interface
Platform::AppView GetView() const override { return m_context.GetAppView(); }

// IContextCallback implementation
Expand Down
8 changes: 4 additions & 4 deletions Modules/Graphics/App/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Graphics App

Graphics application rendering infrastructure implemented on top of [application platform abstraction](../../Platform/App)
Graphics application rendering infrastructure implemented on top of [application platform abstraction](../../Platform/Impl/App)
and [graphics RHI API](../RHI).

## Graphics Application Base Class
Expand Down Expand Up @@ -28,7 +28,7 @@ The following settings are available:

### [Graphics::App](Include/Methane/Graphics/App.hpp)

Graphics application base template class `Graphics::App<Graphics::AppFrame>` is derived from [Platform::App](../../Platform/App)
Graphics application base template class `Graphics::App<Graphics::AppFrame>` is derived from [Platform::App](../../Platform/Impl/App)
extending it with common graphics application functionality implemented with [Graphics::RHI](../RHI) API:
- Parsing graphics app and context settings from command line arguments.
- Graphics render context initialization using provided settings.
Expand All @@ -44,7 +44,7 @@ and extended with other frame-dependent resources in final applications.

`Graphics::AppSettings` structure aggregates 3 setting structures passed all together to the `Graphics::App` constructor:
- [Graphics::IApp::Settings](#graphicsiappincludemethanegraphicsapph) - graphics app settings described above
- [Platform::AppBase::Settings](../../Platform/App/README.md#platformappbaseincludemethaneplatformappbaseh) - platform app settings
- [Platform::AppSettings](../../Platform/Impl/App/README.md#platform-application-base-class) - platform app settings
- [Graphics::RenderContextSettings](../RHI/Interface/Include/Methane/Graphics/IRenderContext.h) - render context settings

Some parameters of the render context settings can be also changed with command line flags:
Expand All @@ -60,7 +60,7 @@ Some parameters of the render context settings can be also changed with command

### [Graphics::AppController](Include/Methane/Graphics/AppController.h)

Graphics **application** controller is derived from [Platform application controller](../../Platform/App/README.md#platformappcontrollerincludemethaneplatformappcontrollerh) and
Graphics **application** controller is derived from [Platform application controller](../../Platform/Impl/App/README.md#platform-application-controller) and
extends it with the following actions:

| Application Action | Keyboard Shortcut |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Methane::Graphics
AppController::AppController(IApp& application, const std::string& application_help,
const Platform::AppController::ActionByKeyboardState& platform_action_by_keyboard_state,
const Graphics::AppController::ActionByKeyboardState& graphics_action_by_keyboard_state)
: Platform::AppController(dynamic_cast<Platform::AppBase&>(application), application_help, platform_action_by_keyboard_state)
: Platform::AppController(dynamic_cast<Platform::Base::App&>(application), application_help, platform_action_by_keyboard_state)
, pin::Keyboard::ActionControllerBase<AppAction>(graphics_action_by_keyboard_state, {})
, m_application(application)
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class CommandList : public CommandListBaseT
if (!CommandListBaseT::SetName(name))
return false;

m_ns_name = MacOS::ConvertToNsString(name);
m_ns_name = Platform::Apple::ConvertToNsString(name);

if (m_mtl_cmd_encoder != nil)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class Context
if (!Base::Context::SetName(name))
return false;

m_ns_name = MacOS::ConvertToNsString(name);
m_ns_name = Platform::Apple::ConvertToNsString(name);
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ inline AppViewMetal* CreateRenderContextAppView(const Platform::AppEnvironment&
appWindow: env.ns_app_delegate.window
pixelFormat: TypeConverter::DataFormatToMetalPixelType(settings.color_format)
drawableCount: settings.frame_buffers_count
vsyncEnabled: MacOS::ConvertToNsBool(settings.vsync_enabled)
vsyncEnabled: Platform::Apple::ConvertToNsBool(settings.vsync_enabled)
#ifdef APPLE_MACOS
unsyncRefreshInterval: 1.0 / settings.unsync_max_fps
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static MTLResourceOptions GetNativeResourceOptions(Rhi::BufferStorageMode storag
if (!Resource::SetName(name))
return false;

m_mtl_buffer.label = MacOS::ConvertToNsString(name);
m_mtl_buffer.label = Platform::Apple::ConvertToNsString(name);
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

CommandListDebugGroup::CommandListDebugGroup(std::string_view name)
: Base::CommandListDebugGroup(name)
, m_ns_name(MacOS::ConvertToNsString(Base::Object::GetName()))
, m_ns_name(Platform::Apple::ConvertToNsString(Base::Object::GetName()))
{ }

} // namespace Methane::Graphics::Metal
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
return false;

META_CHECK_NOT_NULL(m_mtl_command_queue);
m_mtl_command_queue.label = MacOS::ConvertToNsString(name);
m_mtl_command_queue.label = Platform::Apple::ConvertToNsString(name);
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
if (!Base::ComputeState::SetName(name))
return false;

NSString* ns_name = MacOS::ConvertToNsString(name);
NSString* ns_name = Platform::Apple::ConvertToNsString(name);
m_mtl_pipeline_state_desc.label = ns_name;

ResetNativeState();
Expand All @@ -98,7 +98,7 @@
error: &ns_error];
META_CHECK_NOT_NULL_DESCR(m_mtl_pipeline_state,
"failed to create Metal compute pipeline state: {}",
MacOS::ConvertFromNsString([ns_error localizedDescription]));
Platform::Apple::ConvertFromNsString([ns_error localizedDescription]));
}

id<MTLComputePipelineState> ComputeState::GetNativePipelineState()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static bool IsEnvironmentVariableEnabled(const char* variable_name)
static std::string GetNsStringOrDefault(NSString* ns_string, std::string_view default_value)
{
META_FUNCTION_TASK();
return ns_string ? MacOS::ConvertFromNsString(ns_string) : std::string(default_value);
return ns_string ? Platform::Apple::ConvertFromNsString(ns_string) : std::string(default_value);
}

static std::string_view GetLogLevelSeverityName(NSInteger log_level)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}

Device::Device(const id<MTLDevice>& mtl_device, const Capabilities& capabilities)
: Base::Device(MacOS::ConvertFromNsString(mtl_device.name), false, capabilities)
: Base::Device(Platform::Apple::ConvertFromNsString(mtl_device.name), false, capabilities)
, m_mtl_device(mtl_device)
, m_mtl_log_state(CreateDebugLogState(mtl_device))
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
if (!Base::Object::SetName(name))
return false;

m_mtl_event.label = MacOS::ConvertToNsString(name);
m_mtl_event.label = Platform::Apple::ConvertToNsString(name);
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@

META_CHECK_NOT_NULL_DESCR(mtl_render_pipeline_state,
"Failed to create dummy pipeline state for program reflection: {}",
MacOS::ConvertFromNsString([ns_error localizedDescription]));
Platform::Apple::ConvertFromNsString([ns_error localizedDescription]));

if (!mtl_render_pipeline_reflection)
return;
Expand Down Expand Up @@ -162,7 +162,7 @@

META_CHECK_NOT_NULL_DESCR(mtl_compute_pipeline_state,
"Failed to create compute pipeline state for program reflection: {}",
MacOS::ConvertFromNsString([ns_error localizedDescription]));
Platform::Apple::ConvertFromNsString([ns_error localizedDescription]));

if (!mtl_compute_pipeline_reflection)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
static NSString* GetLibraryFullPath(std::string_view library_name)
{
const std::string library_path = fmt::format("{}/{}.metallib", Platform::GetResourceDir(), library_name);
return MacOS::ConvertToNsString(library_path);
return Platform::Apple::ConvertToNsString(library_path);
}

ProgramLibrary::ProgramLibrary(const Device& metal_device, std::string_view library_name)
Expand All @@ -55,7 +55,7 @@
META_CHECK_NOT_NULL_DESCR(m_mtl_library,
"Failed to create {} Metal library: {}",
library_name.empty() ? std::string_view("default") : library_name,
MacOS::ConvertFromNsString([ns_error localizedDescription]));
Platform::Apple::ConvertFromNsString([ns_error localizedDescription]));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{
META_FUNCTION_TASK();

m_frame_capture_scope.label = MacOS::ConvertToNsString(fmt::format("{} Frame Scope", device.GetName()));
m_frame_capture_scope.label = Platform::Apple::ConvertToNsString(fmt::format("{} Frame Scope", device.GetName()));
[MTLCaptureManager sharedCaptureManager].defaultCaptureScope = m_frame_capture_scope;

#ifdef CAPTURE_INITIALIZATION_SCOPE
Expand Down Expand Up @@ -241,8 +241,8 @@
NSError* ns_error = nil;
const bool capture_success = [mtl_capture_manager startCaptureWithDescriptor:mtl_capture_desc error:&ns_error];
META_CHECK_TRUE_DESCR(capture_success, "failed to capture Metal scope '{}', error: {}",
MacOS::ConvertFromNsString(mtl_capture_scope.label),
MacOS::ConvertFromNsString([ns_error localizedDescription]));
Platform::Apple::ConvertFromNsString(mtl_capture_scope.label),
Platform::Apple::ConvertFromNsString([ns_error localizedDescription]));
}

} // namespace Methane::Graphics::Metal
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ static MTLWinding ConvertRasterizerFrontWindingToMetal(bool is_front_counter_clo
if (!Base::RenderState::SetName(name))
return false;

NSString* ns_name = MacOS::ConvertToNsString(name);
NSString* ns_name = Platform::Apple::ConvertToNsString(name);
m_mtl_pipeline_state_desc.label = ns_name;
m_mtl_depth_stencil_state_desc.label = ns_name;

Expand All @@ -300,7 +300,7 @@ static MTLWinding ConvertRasterizerFrontWindingToMetal(bool is_front_counter_clo
m_mtl_pipeline_state = [GetMetalRenderContext().GetMetalDevice().GetNativeDevice() newRenderPipelineStateWithDescriptor:m_mtl_pipeline_state_desc error:&ns_error];
META_CHECK_NOT_NULL_DESCR(m_mtl_pipeline_state,
"failed to create Metal render pipeline state: {}",
MacOS::ConvertFromNsString([ns_error localizedDescription]));
Platform::Apple::ConvertFromNsString([ns_error localizedDescription]));
}

void RenderState::InitializeNativeDepthStencilState()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static MTLSamplerBorderColor ConvertBorderColorToMetal(const Rhi::SamplerBorderC
return false;

META_CHECK_NOT_NULL(m_mtl_sampler_desc);
m_mtl_sampler_desc.label = MacOS::ConvertToNsString(name);
m_mtl_sampler_desc.label = Platform::Apple::ConvertToNsString(name);

ResetSamplerState();
return true;
Expand Down
Loading
Loading