forked from 3DRadSpace/3D_Rad_Space
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInstIRenderTarget.cs
More file actions
28 lines (22 loc) · 661 Bytes
/
Copy pathInstIRenderTarget.cs
File metadata and controls
28 lines (22 loc) · 661 Bytes
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
using System.Runtime.InteropServices;
namespace Engine3DRadSpace.Graphics;
public class InstIRenderTarget : NatPtrWrapper, IRenderTarget
{
[DllImport("3DRadSpace.FFI.dll", EntryPoint = "E3DRSP_IRenderTarget_Destroy")]
extern static void _destroy(IntPtr rt);
[DllImport("3DRadSpace.FFI.dll", EntryPoint = "E3DRSP_IRenderTarget_RenderTargetHandle")]
extern static IntPtr _rt(IntPtr rt);
public InstIRenderTarget(IntPtr handle) : base(handle, _destroy)
{
}
internal InstIRenderTarget(IntPtr handle, bool ownsHandle) : base(handle, ownsHandle ? _destroy : null)
{
}
public IntPtr RenderTargetHandle
{
get
{
return _rt(_handle);
}
}
}