Mtlpp

Alternatives To Mtlpp
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Open Source Ios Apps34,087
2 days ago1cc0-1.0
:iphone: Collaborative List of Open-Source iOS Apps
Prince Of Persia Apple Ii5,935
a year ago1otherAssembly
A running-jumping-swordfighting game I made on the Apple II from 1985-89
Giovanni790
3 years ago10mitSwift
A Gameboy Emulator for the Apple Watch
Arshooter787
6 years ago2apache-2.0Swift
A demo Augmented Reality shooter made with ARKit in Swift (iOS 11)
Virtualgamecontroller413
14 years ago3January 08, 20161otherSwift
Software-based game controllers for iOS, tvOS, OS X and watchOS in Swift 4.2.
Glide391
a year ago5August 10, 2019mitSwift
Game engine for making 2d games on iOS, macOS and tvOS, with practical examples and tutorials
Mtlpp350
3 years ago11mitObjective-C++
C++ Metal wrapper
Watch_quake279
3 months ago1gpl-2.0C
Quake 1 port for Apple Watch
Sequential_social_dilemma_games262
a year ago30mitPython
Repo for reproduction of sequential social dilemmas
Flappy Fly Bird242
7 months agobsd-3-clauseSwift
🐦 Flappy Bird reincarnation [Swift 5.5, GameplayKit, SpriteKit, iOS 12].
Alternatives To Mtlpp
Select To Compare


Alternative Project Comparisons
Readme

license Build Status

mtlpp - C++ wrapper around Metal

Complete wrapper around Metal (Apple's low-level graphics API).

#include "mtlpp.hpp"

int main()
{
    mtlpp::Device device = mtlpp::Device::CreateSystemDefaultDevice();

    mtlpp::CommandQueue commandQueue = device.NewCommandQueue();
    mtlpp::CommandBuffer commandBuffer = commandQueue.CommandBuffer();

    mtlpp::TextureDescriptor textureDesc = mtlpp::TextureDescriptor::Texture2DDescriptor(
        mtlpp::PixelFormat::RGBA8Unorm, 320, 240, false);
    textureDesc.SetUsage(mtlpp::TextureUsage::RenderTarget);
    mtlpp::Texture texture = device.NewTexture(textureDesc);

    // ...

    return 0;
}

Main features

  • Complete API wrapper (iOS 10, tvOS 10, and OS X 10.12).
  • Objective-C free headers - allow compiling agains the Metal API on any platform (no linking on platforms without Metal).
  • Configurable AVAILABILITY and DEPRECATED validation.
  • Amalgamated mtlpp.hpp and mtlpp.mm - or use the contents of src/ folder.

Interop

mtlpp uses Toll-Free Bridging. The example below demonstrates how MTKView (MetalKit) can interop with mtlpp.

   MTKView * mtkView;

   // Objective-C to C++
   mtlpp::Device device = ns::Handle{ (__bridge void*)mtkView.device };

   // C++ to Objective-C
   mtkView.device = (__bridge id<MTLDevice>)device.GetPtr();
Popular Video Game Projects
Popular Apple Projects
Popular Games Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Plus Plus
Game
Apple
Rendering
Graphics
Tvos