Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🎲 Modern 3D graphics made simple with C++20 cross-platform framework and rendering abstraction API on top of DirectX 12, Vulkan & Metal

License

NotificationsYou must be signed in to change notification settings

MethanePowered/MethaneKit

Repository files navigation

CI BuildCI CodeQL ScanCI Sonar ScanQuality Gate StatusCodeCovTest Space MetricGitpod Ready-to-Code

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.

Downloadrelease builds with pre-built samples, tutorials, and tests to try them out.Check the latest build status, tests, code coverage, and analysis results or get build artifacts fromGitHub Actions CI andSonar Cloud.See theBuild Instructions topic for manual build instructions and start learning theMethane Graphics RHI API withHello Triangle and other tutorials' documentation.

Open in Gitpod

PlatformGraphics APIMaster BuildDevelop Build
Windows x64 DirectX 12Windows x64 Master BuildWindows x64 Develop Build
Windows x86 DirectX 12Windows x86 Master BuildWindows x86 Develop Build
Windows x64 VulkanWindows x64 Master BuildWindows x64 Develop Build
Windows x86 VulkanWindows x86 Master BuildWindows x86 Develop Build
Linux VulkanUbuntu Master BuildUbuntu Develop Build
MacOS VulkanMacOS Master BuildMacOS Develop Build
MacOS MetalMacOS Master BuildMacOS Develop Build
iOS (Sim) MetaliOS Master BuildiOS Develop Build
tvOS (Sim) MetaltvOS Master BuildtvOS Develop Build

Static code analysis scans are performed as a part of automated CI build process on master and develop brancheswith up-to-date results published onSonar Cloud.

PlatformSonar Quality GateMaster Scan StatusDevelop Scan Status
Windows DirectXWindows Quality Gate StatusWindows Master Scan StatusWindows Develop Scan Status
Linux VulkanLinux Quality Gate StatusLinux Master Scan StatusLinux Develop Scan Status
MacOS MetalMacOS Quality Gate StatusMacOS Master Scan StatusMacOS Develop Scan Status

Windows Maintainability RatingWindows Reliability RatingWindows Security RatingWindows Code SmellsWindows Duplicated Lines (%)Windows CoverageWindows Lines of Code

Asteroids Sample on Windows

Asteroids sample demonstrating multi-threaded rendering with Methane Kit

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 withHello Triangle tutorial documentationand continue with others.

Name / Link
Screenshot
Description
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.

Name / Link
Screenshot
Description
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

  • Cross-platform application & input classes: Supports Windows, macOS, and Linux
    • CMake modules for convenient application build configuration, adding shaders, and embedding resources
    • HLSL-6 Shaders serving all graphics APIs, converted to native shader language and compiled at build time with SPIRV-Cross & DirectXCompiler
    • HLSL++ Math library withHLSL-like syntax in C++and vector-instruction optimizations for different platforms
  • Modern Graphics API abstractions: based on DirectX 12, Vulkan and Metal APIs
    • Render state and program configuration with compact initialization syntax
    • Program binding objects implement efficient binding of shader arguments to resources
    • Automatic resource state tracking for automatic resource transition barriers setup
    • Resources are automatically retained from destruction while in use on GPU with shared pointers in command list state
    • Command list execution state tracking with optional GPU timestamps query on completion
    • Parallel render command list for multi-threaded render commands encoding in a single render pass
    • Multiple command queues execution on GPU with synchronization using fences
    • Private GPU resources asynchronously updated through the upload command list and shared resource
    • Registry of named graphics objects enabling reuse of render states and graphics resources between renderer objects
  • Graphics primitives and extensions:
    • Graphics application base class with per-frame resource management and frame buffers resizing enabling effective triple buffering
    • Camera primitive and interactive arc-ball camera
    • Procedural mesh generation for quad, box, sphere, icosahedron, and uber-mesh
    • Screen-quad and sky-box rendering extension classes
    • Texture loader (currently implemented with STB, planned for replacement with OpenImageIO)
  • User Interface:
    • UI application base class with integrated HUD, logo badge, and help/parameters text panels
    • Typography library for font loading, dynamic atlas updating, text rendering, and layout
    • Widgets library (under development)
  • Platform Infrastructure:
    • Base application with window management and input handling for Windows, macOS, and Linux
    • Events mechanism connecting emitters and receivers via callback interfaces
    • Animations subsystem
    • Embedded resource providers
  • Integrated debugging and profiling capabilities:
  • Continuous integration with automated multi-platform builds, unit tests, andSonar Cloud static code analysis

For detailed features description and development plans please refer toModules documentation.

Supported Development Tools

Development Environments

Static Code Analysis

Methane Kit comes with continuous C++ static code and code coverage analysis performed as a part of automated CI "Scan" buildswith up-to-date results published onSonar Cloudseparately 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 toMethane 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

License

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

Copyright 2019-2022 © Evgeny GorodetskiyFollow

About

🎲 Modern 3D graphics made simple with C++20 cross-platform framework and rendering abstraction API on top of DirectX 12, Vulkan & Metal

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

    Contributors4

    •  
    •  
    •  
    •  

    [8]ページ先頭

    ©2009-2025 Movatter.jp