-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextureSubPlugin.cs
More file actions
65 lines (56 loc) · 1.64 KB
/
TextureSubPlugin.cs
File metadata and controls
65 lines (56 loc) · 1.64 KB
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
using System;
using System.Runtime.InteropServices;
namespace TextureSubPlugin {
[StructLayout(LayoutKind.Sequential)]
public struct TextureSubImage2DParams {
public IntPtr texture_handle;
public Int32 xoffset;
public Int32 yoffset;
public Int32 width;
public Int32 height;
public IntPtr data_ptr;
public Int32 level;
public Int32 format;
};
[StructLayout(LayoutKind.Sequential)]
public struct TextureSubImage3DParams {
public IntPtr texture_handle;
public Int32 xoffset;
public Int32 yoffset;
public Int32 zoffset;
public Int32 width;
public Int32 height;
public Int32 depth;
public IntPtr data_ptr;
public Int32 level;
public Int32 format;
};
[StructLayout(LayoutKind.Sequential)]
public struct CreateTexture3DParams {
public UInt32 texture_id;
public UInt32 width;
public UInt32 height;
public UInt32 depth;
public Int32 format;
};
[StructLayout(LayoutKind.Sequential)]
public struct DestroyTexture3DParams {
public UInt32 texture_id;
};
public enum Event : Int32 {
TextureSubImage2D = 0,
TextureSubImage3D = 1,
CreateTexture3D = 2,
DestroyTexture3D = 3
};
public enum Format : Int32 {
UR8 = 0,
UR16 = 1
}
public static class API {
[DllImport("TextureSubPlugin")]
public static extern IntPtr GetRenderEventFunc();
[DllImport("TextureSubPlugin")]
public static extern IntPtr RetrieveCreatedTexture3D(UInt32 texture_id);
};
}