2#include "RGLCommon.hpp"
3#include "TextureFormat.hpp"
4#include "MTLObjCCompatLayer.hpp"
5#include <RGL/Types.hpp>
6#include <RGL/Common.hpp>
8#define MTL_CHECK(a) {NSError* err = nullptr; a; if(err != nullptr){ RGL::FatalError([[NSString stringWithFormat:@"%s\n\n%@", #a, err] UTF8String]);}}
12 struct RenderPassConfig;
17 APPLE_API_TYPE(MTLPixelFormat) rgl2mtlformat(TextureFormat format);
18 APPLE_API_TYPE(MTLTextureUsage) rgl2mtlTextureUsage(TextureUsage usage);
20 RGLRenderPassPtr CreateRenderPassMTL(
const RenderPassConfig&);
22 APPLE_API_TYPE(MTLCompareFunction) rgl2mtlcomparefunction(RGL::DepthCompareFunction fn);