๐ฒ Modern 3D graphics made simple with C++20 cross-platform framework and rendering abstraction API on top of DirectX 12, Vulkan & Metal
Methane Kit 
Easy to use modern 3D graphics rendering abstraction API and cross-platform application framework:
- Builds on top of modern native 3D graphics APIs: DirectX 12 on Windows, Vulkan on Linux, Metal on macOS, iOS & tvOS.
- Simplifies modern graphics programming with an object-oriented medium-level graphics API inspired by the simplicity of Apple Metal. Common shaders code in HLSL 6 is used on all platforms.
- Provides a cross-platform application framework with a CMake build toolchain, platform-independent application foundation classes, and a native-GUI layer for Windows, Linux, and macOS.
| Platform | Graphics API | Master Build | Develop Build | |-------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
Windows x64 |
DirectX 12 | |
| |
Windows x86 |
DirectX 12 | |
| |
Windows x64 |
Vulkan | |
| |
Windows x86 |
Vulkan | |
| |
Linux |
Vulkan | |
| |
MacOS |
Vulkan | |
| |
MacOS |
Metal | |
| |
iOS (Sim) |
Metal | |
| |
tvOS (Sim) |
Metal | |
|
Static code analysis scans are performed as a part of automated CI build process on master and develop branches with up-to-date results published on Sonar Cloud.
| Platform | Sonar Quality Gate | Master Scan Status | Develop Scan Status | |-----------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
Windows DirectX | |
|
| |
Linux Vulkan | |
|
| |
MacOS Metal | |
|
|
Asteroids sample demonstrating multi-threaded rendering with Methane Kit
Build Instructions
- Prerequisites
- Fetch Sources
- - Notes
- First time initialization
- Update sources to latest revision
- Building from Sources
Getting Started
High-Level Architecture
Methane Kit architecture is clearly distributing library modules between 5 layers from low to high level of abstraction.
Rendering Hardware Interface (RHI)
Methane Graphics RHI module implements a set of public object-oriented interfaces, which make modern graphics programming easy and convenient in a platform and API independent way.
Tutorials
Start learning Methane Graphics API with Hello Triangle tutorial documentation and continue with others.
|
Name / Link|
Screenshot|
Description| |-----------------------------------------------------|------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------| | 1. Hello Triangle |
| Colored triangle rendering in 100 lines of code. | | 2. Hello Cube |
| Colored cube rendering in 200 lines of code with vertex and index buffers. | | 3. Textured Cube |
| Textured cube introduces buffers, textures and samplers usage with Phong shading. | | 4. Shadow Cube |
| Shadow cube introduces multi-pass rendering with render passes. | | 5. Typography |
| Typography demonstrates animated text rendering with dynamic font atlas updates using Methane UI. | | 6. Cube-Map Array |
| Cube-map array texturing along with sky-box rendering. | | 7. Parallel Rendering |
| Parallel rendering of the textured cube instances to the single render pass. | | 8. Console Compute |
| Conway's Game of Life implemented in Compute Shader and running in pure console application. |
Samples
Methane samples demonstrate advanced techniques and usage scenarios with more complex implementation than tutorials above. Samples are distributes in form of separate repositories.
|
Name / Link|
Screenshot|
Description| |-----------------------------------------|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Asteroids |
| Benchmark demonstrating parallel render commands encoding in a single render pass for the large number of heterogeneous asteroid objects processed in multiple threads. |
Features
- Cross-platform application & input classes: Supports Windows, macOS, and Linux
- Modern Graphics API abstractions: based on DirectX 12, Vulkan and Metal APIs
- Graphics primitives and extensions:
- User Interface:
- Platform Infrastructure:
- Integrated debugging and profiling capabilities:
- Continuous integration with automated multi-platform builds, unit tests, and
For detailed features description and development plans please refer to Modules documentation.
Supported Development Tools
Development Environments
- Jet Brains CLion (pre-configured with .idea)
- Microsoft VS Code and GitPod (pre-configured with CMakePresets.json and .vscode/settings.json)
- Microsoft Visual Studio 2022
- Apple XCode
- Qt Creator with CMake native support
Static Code Analysis
Methane Kit comes with continuous C++ static code and code coverage analysis performed as a part of automated CI "Scan" builds with up-to-date results published on Sonar Cloud separately for all supported platforms.
| Master Scan Results | Windows | MacOS | Linux | |----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Scan Build Status | |
|
| | Quality Gate |
|
|
| | Maintainability |
|
|
| | Reliability |
|
|
| | Security |
|
|
| | Technical Debt |
|
|
| | Bugs |
|
|
| | Vulnerabilities |
|
|
| | Code Smells |
|
|
| | Duplicated Lines |
|
|
| | Tests Coverage |
|
|
| | Lines of Code |
|
|
|
Trace Profiling Tools
Methane Kit contains integrated instrumentation of all libraries for performance analysis with trace collection using following tools. Please refer to Methane Instrumentation document for more details on trace collection instructions and related build options.
| Tracy Frame Profiler | Intel Graphics Trace Analyzer | |--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------| |
|
|
Frame Profiling and Debugging Tools
- Intel Graphics Frame Analyzer
- Apple XCode Metal Debugger
- RenderDoc
- Microsoft PIX
- NVidia Nsight Graphics
External Dependencies
License
Methane Kit is distributed under Apache 2.0 License: it is free to use and open for contributions!