This repository has been archived by the owner on Jun 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathMTLRenderPassColorAttachmentDescriptor.cs
66 lines (57 loc) · 2.19 KB
/
MTLRenderPassColorAttachmentDescriptor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
using static Veldrid.MetalBindings.ObjectiveCRuntime;
namespace Veldrid.MetalBindings
{
public struct MTLRenderPassColorAttachmentDescriptor
{
public readonly IntPtr NativePtr;
public MTLRenderPassColorAttachmentDescriptor(IntPtr ptr) => NativePtr = ptr;
public MTLTexture texture
{
get => objc_msgSend<MTLTexture>(NativePtr, Selectors.texture);
set => objc_msgSend(NativePtr, Selectors.setTexture, value.NativePtr);
}
public MTLLoadAction loadAction
{
get => (MTLLoadAction)uint_objc_msgSend(NativePtr, Selectors.loadAction);
set => objc_msgSend(NativePtr, Selectors.setLoadAction, (uint)value);
}
public MTLStoreAction storeAction
{
get => (MTLStoreAction)uint_objc_msgSend(NativePtr, Selectors.storeAction);
set => objc_msgSend(NativePtr, Selectors.setStoreAction, (uint)value);
}
public MTLTexture resolveTexture
{
get => objc_msgSend<MTLTexture>(NativePtr, Selectors.resolveTexture);
set => objc_msgSend(NativePtr, Selectors.setResolveTexture, value.NativePtr);
}
public MTLClearColor clearColor
{
get
{
if (ObjectiveCRuntime.UseStret<MTLClearColor>())
{
return objc_msgSend_stret<MTLClearColor>(NativePtr, sel_clearColor);
}
else
{
return MTLClearColor_objc_msgSend(NativePtr,sel_clearColor);
}
}
set => objc_msgSend(NativePtr, sel_setClearColor, value);
}
public UIntPtr slice
{
get => UIntPtr_objc_msgSend(NativePtr, Selectors.slice);
set => objc_msgSend(NativePtr, Selectors.setSlice, value);
}
public UIntPtr level
{
get => UIntPtr_objc_msgSend(NativePtr, Selectors.level);
set => objc_msgSend(NativePtr, Selectors.setLevel, value);
}
private static readonly Selector sel_clearColor = "clearColor";
private static readonly Selector sel_setClearColor = "setClearColor:";
}
}