summaryrefslogtreecommitdiff
path: root/include/yasl/metal.h
blob: 695f80c5799d0d8f759b5f2243f8ebe117c8cce4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/** @file Direct Metal layer; application configures its device/format and presents. */
#ifndef YASL_METAL_H
#define YASL_METAL_H
#include "yasl/yasl.h"
#ifdef __OBJC__
@class CAMetalLayer;
#else
typedef struct objc_object CAMetalLayer;
#endif
#ifdef __cplusplus
extern "C" {
#endif
/** Borrowed until surface destruction. YASL owns view/layer and drawableSize.
 * No device, drawable acquisition, command submission, or implicit present.
 * Returns NULL on unsupported backend, CPU/GL surface, or incompatible presenter. */
YASL_API CAMetalLayer *yasl_metal_layer(yasl_surface *surface);
#ifdef __cplusplus
}
#endif
#endif