Home

Awesome

Methane Kit <img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Logo/MethaneLogoNameSmall.png" width=200 align="right" valign="middle">

CI Build CI CodeQL Scan CI Sonar Scan Quality Gate Status CodeCov Test Space Metric Gitpod Ready-to-Code

Easy to use modern 3D graphics rendering abstraction API and cross-platform application framework:

Download release builds with pre-built samples, tutorials and tests to try them out. Check latest build status, tests, code coverage and analysis results or get build artifacts from GitHub Actions CI and Sonar Cloud. See Build Instructions topic for manual build instructions and start learning Methane Graphics RHI API with Hello Triangle and other tutorials' documentation.

Open in Gitpod

PlatformGraphics APIMaster BuildDevelop Build
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/Windows.png" width=24 valign="middle"> Windows x64<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/GraphicsApi/DirectX12Small.png" width=24 valign="middle"> DirectX 12Windows x64 Master BuildWindows x64 Develop Build
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/Windows.png" width=24 valign="middle"> Windows x86<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/GraphicsApi/DirectX12Small.png" width=24 valign="middle"> DirectX 12Windows x86 Master BuildWindows x86 Develop Build
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/Windows.png" width=24 valign="middle"> Windows x64<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/GraphicsApi/VulkanSmall.png" width=24 valign="middle"> VulkanWindows x64 Master BuildWindows x64 Develop Build
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/Windows.png" width=24 valign="middle"> Windows x86<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/GraphicsApi/VulkanSmall.png" width=24 valign="middle"> VulkanWindows x86 Master BuildWindows x86 Develop Build
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/Linux.png" width=24 valign="middle"> Linux<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/GraphicsApi/VulkanSmall.png" width=24 valign="middle"> VulkanUbuntu Master BuildUbuntu Develop Build
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/MacOS.png" width=24 valign="middle"> MacOS<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/GraphicsApi/VulkanSmall.png" width=24 valign="middle"> VulkanMacOS Master BuildMacOS Develop Build
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/MacOS.png" width=24 valign="middle"> MacOS<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/GraphicsApi/MetalSmall.png" width=24 valign="middle"> MetalMacOS Master BuildMacOS Develop Build
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/iOS.png" width=24 valign="middle"> iOS (Sim)<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/GraphicsApi/MetalSmall.png" width=24 valign="middle"> MetaliOS Master BuildiOS Develop Build
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/iOS.png" width=24 valign="middle"> tvOS (Sim)<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/GraphicsApi/MetalSmall.png" width=24 valign="middle"> MetaltvOS Master BuildtvOS Develop Build

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.

PlatformSonar Quality GateMaster Scan StatusDevelop Scan Status
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/Windows.png" width=24 valign="middle"> Windows DirectXWindows Quality Gate StatusWindows Master Scan StatusWindows Develop Scan Status
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/Linux.png" width=24 valign="middle"> Linux VulkanLinux Quality Gate StatusLinux Master Scan StatusLinux Develop Scan Status
<img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Images/Platforms/MacOS.png" width=24 valign="middle"> MacOS MetalMacOS Quality Gate StatusMacOS Master Scan StatusMacOS Develop Scan Status

Windows Maintainability Rating Windows Reliability Rating Windows Security Rating Windows Code Smells Windows Duplicated Lines (%) Windows Coverage Windows Lines of Code

Asteroids Sample on Windows

<p align="center"><i><a href="https://github.com/MethanePowered/MethaneAsteroids">Asteroids sample</a> demonstrating multi-threaded rendering with Methane Kit</i></p>

Build Instructions

Getting Started

High-Level Architecture

Methane Kit architecture is clearly distributing library modules between 5 layers from low to high level of abstraction. High Level Architecture

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. Graphics RHI

Tutorials

Start learning Methane Graphics API with Hello Triangle tutorial documentation and continue with others.

<pre><b>Name / Link</b></pre><pre><b>Screenshot</b></pre><pre><b>Description</b> </pre>
1. Hello TriangleHello Triangle on WindowsColored triangle rendering in 100 lines of code.
2. Hello CubeHello Cube on WindowsColored cube rendering in 200 lines of code with vertex and index buffers.
3. Textured CubeTextured Cube on WindowsTextured cube introduces buffers, textures and samplers usage with Phong shading.
4. Shadow CubeShadow Cube on WindowsShadow cube introduces multi-pass rendering with render passes.
5. TypographyTypography on WindowsTypography demonstrates animated text rendering with dynamic font atlas updates using Methane UI.
6. Cube-Map ArrayCube-Map Array on WindowsCube-map array texturing along with sky-box rendering.
7. Parallel RenderingParallel Rendering on WindowsParallel rendering of the textured cube instances to the single render pass.
8. Console ComputeConsole Compute on WindowsConway'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.

<pre><b>Name / Link</b></pre><pre><b>Screenshot</b></pre><pre><b>Description</b> </pre>
AsteroidsAsteroids on WindowsBenchmark demonstrating parallel render commands encoding in a single render pass for the large number of heterogeneous asteroid objects processed in multiple threads.

Features

For detailed features description and development plans please refer to Modules documentation.

Supported Development Tools

Development Environments

<a href="https://www.jetbrains.com/?from=MethaneKit" target="_blank"><img src="https://github.com/MethanePowered/MethaneKit/blob/master/Docs/Partners/JetBrains.png" width=200 align="right" valign="bottom"/></a>

Methane Kit is being developed with support of Jet Brains development tools. Open source project development license is provided free of charge to all key contributors of Methane Kit project.

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 ResultsWindowsMacOSLinux
Scan Build StatusWindows Master Scan StatusMacOS Master Scan StatusLinux Master Scan Status
Quality GateWindows Quality Gate StatusMacOS Quality Gate StatusLinux Quality Gate Status
MaintainabilityWindows Maintainability RatingMacOS Maintainability RatingLinux Maintainability Rating
ReliabilityWindows Reliability RatingMacOS Reliability RatingLinux Reliability Rating
SecurityWindows Security RatingMacOS Security RatingLinux Security Rating
Technical DebtWindows Technical DebtMacOS Technical DebtLinux Technical Debt
BugsWindows BugsMacOS BugsLinux Bugs
VulnerabilitiesWindows VulnerabilitiesMacOS VulnerabilitiesLinux Vulnerabilities
Code SmellsWindows Code SmellsMacOS Code SmellsLinux Code Smells
Duplicated LinesWindows Duplicated Lines (%)MacOS Duplicated Lines (%)Linux Duplicated Lines (%)
Tests CoverageWindows CoverageMacOS CoverageLinux Coverage
Lines of CodeWindows Lines of CodeMacOS Lines of CodeLinux 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 ProfilerIntel Graphics Trace Analyzer
Asteroids Trace in TracyAsteroids Trace in GPA Trace Analyzer

Frame Profiling and Debugging Tools

External Dependencies

License

Methane Kit is distributed under Apache 2.0 License: it is free to use and open for contributions!

Copyright 2019-2022 © Evgeny Gorodetskiy Follow