-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
313 lines (265 loc) · 26.3 KB
/
notes.txt
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
See: https://github.com/LWJGL/lwjgl3-wiki/wiki/1.3.-Memory-FAQ
MemoryStack > MemoryUtil > BufferUtils
TODO:
- Unify API and promote type safety
- Make common types interfaces with implementations depending on usage
- For example, different types of uniform impls should exist depending on if size is known at creation or later
- Allow patterns which can use MemoryStack under surface without forcing user to know about it
- Split Assertions into two libs (like slf4j and logging backend) with default NO-OPs
- Move all API to interface and Implementations to concrete class which implements handle() and wrap() for all!
- make SEPERATE types for Transient/Dynamic/normal Buffers depending on if they are allocated on stack or heap
- this is because stack allocated will NOT need a dispose() function
GOAL:
The ONLY goal of BGFX4j is to create a java-friendly api to bgfx. No abstraction of the bgfx library is to be created (past what is required to create a java-like experience). Abstraction will be provided by reactorfx, the reactor-core game engine built on top of this library.
PERSONAL USAGE:
This library is necessary boilerplate designed to empower upcoming projects:
rxfx (with reactor-virtual + this library) to create a virtual-time event-driven reactive-stream game engine that uses bgfx (via bgfx4j) for its backend
1. Render thread is thread where bgfx::init is called.
Bgfx assumes ALL calls occur on this thread with exceptions of: Resource, View, and Encoder API.
2. Resource api:
Any API call starting with:
bgfx::create*,
bgfx::destroy*,
bgfx::update*,
bgfx::alloc*
Internally guarded by mutex, so any number of threads can call
Relatively cheap since work is later done in render call
3. View api:
Any API call starting with:
bgfx::setView*
Each created view is not thread-safe, however this is fine:
threadA --calls--> viewA
threadB --calls--> viewB
bgfx::setViewMode must be called any draw calls are issued
4. Encoder api:
obtained by calling bgfx::begin
bgfx by default allows 8 simultaneous threads to use encoders
(can be changed https://bkaradzic.github.io/bgfx/internals.html)
LIST OF FUNCTIONS:
attachment_init = apiGetFunctionAddress(BGFX, "bgfx_attachment_init"),
vertex_decl_begin = apiGetFunctionAddress(BGFX, "bgfx_vertex_layout_begin"),
vertex_decl_add = apiGetFunctionAddress(BGFX, "bgfx_vertex_layout_add"),
vertex_decl_decode = apiGetFunctionAddress(BGFX, "bgfx_vertex_layout_decode"),
vertex_decl_has = apiGetFunctionAddress(BGFX, "bgfx_vertex_layout_has"),
vertex_decl_skip = apiGetFunctionAddress(BGFX, "bgfx_vertex_layout_skip"),
vertex_decl_end = apiGetFunctionAddress(BGFX, "bgfx_vertex_layout_end"),
vertex_pack = apiGetFunctionAddress(BGFX, "bgfx_vertex_pack"),
vertex_unpack = apiGetFunctionAddress(BGFX, "bgfx_vertex_unpack"),
vertex_convert = apiGetFunctionAddress(BGFX, "bgfx_vertex_convert"),
weld_vertices = apiGetFunctionAddress(BGFX, "bgfx_weld_vertices"),
topology_convert = apiGetFunctionAddress(BGFX, "bgfx_topology_convert"),
topology_sort_tri_list = apiGetFunctionAddress(BGFX, "bgfx_topology_sort_tri_list"),
get_supported_renderers = apiGetFunctionAddress(BGFX, "bgfx_get_supported_renderers"),
get_renderer_name = apiGetFunctionAddress(BGFX, "bgfx_get_renderer_name"),
init_ctor = apiGetFunctionAddress(BGFX, "bgfx_init_ctor"),
init = apiGetFunctionAddress(BGFX, "bgfx_init"),
shutdown = apiGetFunctionAddress(BGFX, "bgfx_shutdown"),
reset = apiGetFunctionAddress(BGFX, "bgfx_reset"),
frame = apiGetFunctionAddress(BGFX, "bgfx_frame"),
get_renderer_type = apiGetFunctionAddress(BGFX, "bgfx_get_renderer_type"),
get_caps = apiGetFunctionAddress(BGFX, "bgfx_get_caps"),
get_stats = apiGetFunctionAddress(BGFX, "bgfx_get_stats"),
alloc = apiGetFunctionAddress(BGFX, "bgfx_alloc"),
copy = apiGetFunctionAddress(BGFX, "bgfx_copy"),
make_ref = apiGetFunctionAddress(BGFX, "bgfx_make_ref"),
make_ref_release = apiGetFunctionAddress(BGFX, "bgfx_make_ref_release"),
set_debug = apiGetFunctionAddress(BGFX, "bgfx_set_debug"),
dbg_text_clear = apiGetFunctionAddress(BGFX, "bgfx_dbg_text_clear"),
dbg_text_printf = apiGetFunctionAddress(BGFX, "bgfx_dbg_text_printf"),
dbg_text_vprintf = apiGetFunctionAddress(BGFX, "bgfx_dbg_text_vprintf"),
dbg_text_image = apiGetFunctionAddress(BGFX, "bgfx_dbg_text_image"),
create_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_create_index_buffer"),
set_index_buffer_name = apiGetFunctionAddress(BGFX, "bgfx_set_index_buffer_name"),
destroy_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_destroy_index_buffer"),
create_vertex_decl = apiGetFunctionAddress(BGFX, "bgfx_create_vertex_decl"),
destroy_vertex_decl = apiGetFunctionAddress(BGFX, "bgfx_destroy_vertex_decl"),
create_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_create_vertex_buffer"),
set_vertex_buffer_name = apiGetFunctionAddress(BGFX, "bgfx_set_vertex_buffer_name"),
destroy_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_destroy_vertex_buffer"),
create_dynamic_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_create_dynamic_index_buffer"),
create_dynamic_index_buffer_mem = apiGetFunctionAddress(BGFX, "bgfx_create_dynamic_index_buffer_mem"),
update_dynamic_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_update_dynamic_index_buffer"),
destroy_dynamic_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_destroy_dynamic_index_buffer"),
create_dynamic_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_create_dynamic_vertex_buffer"),
create_dynamic_vertex_buffer_mem = apiGetFunctionAddress(BGFX, "bgfx_create_dynamic_vertex_buffer_mem"),
update_dynamic_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_update_dynamic_vertex_buffer"),
destroy_dynamic_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_destroy_dynamic_vertex_buffer"),
get_avail_transient_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_get_avail_transient_index_buffer"),
get_avail_transient_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_get_avail_transient_vertex_buffer"),
get_avail_instance_data_buffer = apiGetFunctionAddress(BGFX, "bgfx_get_avail_instance_data_buffer"),
alloc_transient_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_alloc_transient_index_buffer"),
alloc_transient_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_alloc_transient_vertex_buffer"),
alloc_transient_buffers = apiGetFunctionAddress(BGFX, "bgfx_alloc_transient_buffers"),
alloc_instance_data_buffer = apiGetFunctionAddress(BGFX, "bgfx_alloc_instance_data_buffer"),
create_indirect_buffer = apiGetFunctionAddress(BGFX, "bgfx_create_indirect_buffer"),
destroy_indirect_buffer = apiGetFunctionAddress(BGFX, "bgfx_destroy_indirect_buffer"),
create_shader = apiGetFunctionAddress(BGFX, "bgfx_create_shader"),
get_shader_uniforms = apiGetFunctionAddress(BGFX, "bgfx_get_shader_uniforms"),
set_shader_name = apiGetFunctionAddress(BGFX, "bgfx_set_shader_name"),
destroy_shader = apiGetFunctionAddress(BGFX, "bgfx_destroy_shader"),
create_program = apiGetFunctionAddress(BGFX, "bgfx_create_program"),
create_compute_program = apiGetFunctionAddress(BGFX, "bgfx_create_compute_program"),
destroy_program = apiGetFunctionAddress(BGFX, "bgfx_destroy_program"),
is_texture_valid = apiGetFunctionAddress(BGFX, "bgfx_is_texture_valid"),
calc_texture_size = apiGetFunctionAddress(BGFX, "bgfx_calc_texture_size"),
create_texture = apiGetFunctionAddress(BGFX, "bgfx_create_texture"),
create_texture_2d = apiGetFunctionAddress(BGFX, "bgfx_create_texture_2d"),
create_texture_2d_scaled = apiGetFunctionAddress(BGFX, "bgfx_create_texture_2d_scaled"),
create_texture_3d = apiGetFunctionAddress(BGFX, "bgfx_create_texture_3d"),
create_texture_cube = apiGetFunctionAddress(BGFX, "bgfx_create_texture_cube"),
update_texture_2d = apiGetFunctionAddress(BGFX, "bgfx_update_texture_2d"),
update_texture_3d = apiGetFunctionAddress(BGFX, "bgfx_update_texture_3d"),
update_texture_cube = apiGetFunctionAddress(BGFX, "bgfx_update_texture_cube"),
read_texture = apiGetFunctionAddress(BGFX, "bgfx_read_texture"),
set_texture_name = apiGetFunctionAddress(BGFX, "bgfx_set_texture_name"),
get_direct_access_ptr = apiGetFunctionAddress(BGFX, "bgfx_get_direct_access_ptr"),
destroy_texture = apiGetFunctionAddress(BGFX, "bgfx_destroy_texture"),
create_frame_buffer = apiGetFunctionAddress(BGFX, "bgfx_create_frame_buffer"),
create_frame_buffer_scaled = apiGetFunctionAddress(BGFX, "bgfx_create_frame_buffer_scaled"),
create_frame_buffer_from_handles = apiGetFunctionAddress(BGFX, "bgfx_create_frame_buffer_from_handles"),
create_frame_buffer_from_attachment = apiGetFunctionAddress(BGFX, "bgfx_create_frame_buffer_from_attachment"),
create_frame_buffer_from_nwh = apiGetFunctionAddress(BGFX, "bgfx_create_frame_buffer_from_nwh"),
set_frame_buffer_name = apiGetFunctionAddress(BGFX, "bgfx_set_frame_buffer_name"),
get_texture = apiGetFunctionAddress(BGFX, "bgfx_get_texture"),
destroy_frame_buffer = apiGetFunctionAddress(BGFX, "bgfx_destroy_frame_buffer"),
create_uniform = apiGetFunctionAddress(BGFX, "bgfx_create_uniform"),
get_uniform_info = apiGetFunctionAddress(BGFX, "bgfx_get_uniform_info"),
destroy_uniform = apiGetFunctionAddress(BGFX, "bgfx_destroy_uniform"),
create_occlusion_query = apiGetFunctionAddress(BGFX, "bgfx_create_occlusion_query"),
get_result = apiGetFunctionAddress(BGFX, "bgfx_get_result"),
destroy_occlusion_query = apiGetFunctionAddress(BGFX, "bgfx_destroy_occlusion_query"),
set_palette_color = apiGetFunctionAddress(BGFX, "bgfx_set_palette_color"),
set_palette_color_rgba8 = apiGetFunctionAddress(BGFX, "bgfx_set_palette_color_rgba8"),
set_view_name = apiGetFunctionAddress(BGFX, "bgfx_set_view_name"),
set_view_rect = apiGetFunctionAddress(BGFX, "bgfx_set_view_rect"),
set_view_rect_ratio = apiGetFunctionAddress(BGFX, "bgfx_set_view_rect_ratio"),
set_view_scissor = apiGetFunctionAddress(BGFX, "bgfx_set_view_scissor"),
set_view_clear = apiGetFunctionAddress(BGFX, "bgfx_set_view_clear"),
set_view_clear_mrt = apiGetFunctionAddress(BGFX, "bgfx_set_view_clear_mrt"),
set_view_mode = apiGetFunctionAddress(BGFX, "bgfx_set_view_mode"),
set_view_frame_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_view_frame_buffer"),
set_view_transform = apiGetFunctionAddress(BGFX, "bgfx_set_view_transform"),
set_view_order = apiGetFunctionAddress(BGFX, "bgfx_set_view_order"),
encoder_begin = apiGetFunctionAddress(BGFX, "bgfx_encoder_begin"),
encoder_end = apiGetFunctionAddress(BGFX, "bgfx_encoder_end"),
encoder_set_marker = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_marker"),
encoder_set_state = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_state"),
encoder_set_condition = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_condition"),
encoder_set_stencil = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_stencil"),
encoder_set_scissor = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_scissor"),
encoder_set_scissor_cached = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_scissor_cached"),
encoder_set_transform = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_transform"),
encoder_set_transform_cached = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_transform_cached"),
encoder_alloc_transform = apiGetFunctionAddress(BGFX, "bgfx_encoder_alloc_transform"),
encoder_set_uniform = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_uniform"),
encoder_set_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_index_buffer"),
encoder_set_dynamic_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_dynamic_index_buffer"),
encoder_set_transient_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_transient_index_buffer"),
encoder_set_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_vertex_buffer"),
encoder_set_dynamic_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_dynamic_vertex_buffer"),
encoder_set_transient_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_transient_vertex_buffer"),
encoder_set_vertex_count = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_vertex_count"),
encoder_set_instance_data_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_instance_data_buffer"),
encoder_set_instance_data_from_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_instance_data_from_vertex_buffer"),
encoder_set_instance_data_from_dynamic_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer"),
encoder_set_instance_count = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_instance_count"),
encoder_set_texture = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_texture"),
encoder_touch = apiGetFunctionAddress(BGFX, "bgfx_encoder_touch"),
encoder_submit = apiGetFunctionAddress(BGFX, "bgfx_encoder_submit"),
encoder_submit_occlusion_query = apiGetFunctionAddress(BGFX, "bgfx_encoder_submit_occlusion_query"),
encoder_submit_indirect = apiGetFunctionAddress(BGFX, "bgfx_encoder_submit_indirect"),
encoder_set_compute_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_compute_index_buffer"),
encoder_set_compute_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_compute_vertex_buffer"),
encoder_set_compute_dynamic_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_compute_dynamic_index_buffer"),
encoder_set_compute_dynamic_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_compute_dynamic_vertex_buffer"),
encoder_set_compute_indirect_buffer = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_compute_indirect_buffer"),
encoder_set_image = apiGetFunctionAddress(BGFX, "bgfx_encoder_set_image"),
encoder_dispatch = apiGetFunctionAddress(BGFX, "bgfx_encoder_dispatch"),
encoder_dispatch_indirect = apiGetFunctionAddress(BGFX, "bgfx_encoder_dispatch_indirect"),
encoder_discard = apiGetFunctionAddress(BGFX, "bgfx_encoder_discard"),
encoder_blit = apiGetFunctionAddress(BGFX, "bgfx_encoder_blit"),
request_screen_shot = apiGetFunctionAddress(BGFX, "bgfx_request_screen_shot"),
set_marker = apiGetFunctionAddress(BGFX, "bgfx_set_marker"),
set_state = apiGetFunctionAddress(BGFX, "bgfx_set_state"),
set_condition = apiGetFunctionAddress(BGFX, "bgfx_set_condition"),
set_stencil = apiGetFunctionAddress(BGFX, "bgfx_set_stencil"),
set_scissor = apiGetFunctionAddress(BGFX, "bgfx_set_scissor"),
set_scissor_cached = apiGetFunctionAddress(BGFX, "bgfx_set_scissor_cached"),
set_transform = apiGetFunctionAddress(BGFX, "bgfx_set_transform"),
set_transform_cached = apiGetFunctionAddress(BGFX, "bgfx_set_transform_cached"),
alloc_transform = apiGetFunctionAddress(BGFX, "bgfx_alloc_transform"),
set_uniform = apiGetFunctionAddress(BGFX, "bgfx_set_uniform"),
set_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_index_buffer"),
set_dynamic_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_dynamic_index_buffer"),
set_transient_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_transient_index_buffer"),
set_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_vertex_buffer"),
set_dynamic_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_dynamic_vertex_buffer"),
set_transient_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_transient_vertex_buffer"),
set_vertex_count = apiGetFunctionAddress(BGFX, "bgfx_set_vertex_count"),
set_instance_data_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_instance_data_buffer"),
set_instance_data_from_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_instance_data_from_vertex_buffer"),
set_instance_data_from_dynamic_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_instance_data_from_dynamic_vertex_buffer"),
set_instance_count = apiGetFunctionAddress(BGFX, "bgfx_set_instance_count"),
set_texture = apiGetFunctionAddress(BGFX, "bgfx_set_texture"),
touch = apiGetFunctionAddress(BGFX, "bgfx_touch"),
submit = apiGetFunctionAddress(BGFX, "bgfx_submit"),
submit_occlusion_query = apiGetFunctionAddress(BGFX, "bgfx_submit_occlusion_query"),
submit_indirect = apiGetFunctionAddress(BGFX, "bgfx_submit_indirect"),
set_compute_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_compute_index_buffer"),
set_compute_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_compute_vertex_buffer"),
set_compute_dynamic_index_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_compute_dynamic_index_buffer"),
set_compute_dynamic_vertex_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_compute_dynamic_vertex_buffer"),
set_compute_indirect_buffer = apiGetFunctionAddress(BGFX, "bgfx_set_compute_indirect_buffer"),
set_image = apiGetFunctionAddress(BGFX, "bgfx_set_image"),
dispatch = apiGetFunctionAddress(BGFX, "bgfx_dispatch"),
dispatch_indirect = apiGetFunctionAddress(BGFX, "bgfx_dispatch_indirect"),
discard = apiGetFunctionAddress(BGFX, "bgfx_discard"),
blit = apiGetFunctionAddress(BGFX, "bgfx_blit");
Num.ONE, BgfxAttribType.UINT8, UINT8_Vec1
Num.TWO, BgfxAttribType.UINT8, UINT8_Vec2
Num.THREE, BgfxAttribType.UINT8, UINT8_Vec3
Num.FOUR, BgfxAttribType.UINT8, UINT8_Vec4
Num.ONE, BgfxAttribType.UINT10, UINT10_Vec1
Num.TWO, BgfxAttribType.UINT10, UINT10_Vec2
Num.THREE, BgfxAttribType.UINT10, UINT10_Vec3
Num.FOUR, BgfxAttribType.UINT10, UINT10_Vec4
Num.ONE, BgfxAttribType.INT16, INT16_Vec1
Num.TWO, BgfxAttribType.INT16, INT16_Vec2
Num.THREE, BgfxAttribType.INT16, INT16_Vec3
Num.FOUR, BgfxAttribType.INT16, INT16_Vec4
Num.ONE, BgfxAttribType.HALF, HALF_Vec1
Num.TWO, BgfxAttribType.HALF, HALF_Vec2
Num.THREE, BgfxAttribType.HALF, HALF_Vec3
Num.FOUR, BgfxAttribType.HALF, HALF_Vec4
Num.ONE, BgfxAttribType.FLOAT, FLOAT_Vec1
Num.TWO, BgfxAttribType.FLOAT, FLOAT_Vec2
Num.THREE, BgfxAttribType.FLOAT, FLOAT_Vec3
Num.FOUR, BgfxAttribType.FLOAT, FLOAT_Vec4
Num.ONE, BgfxAttribType.UINT8, UINT8_Vec1
Num.TWO, BgfxAttribType.UINT8, UINT8_Vec2
Num.THREE, BgfxAttribType.UINT8, UINT8_Vec3
Num.FOUR, BgfxAttribType.UINT8, UINT8_Vec4
Num.ONE, BgfxAttribType.UINT10, UINT10_Vec1
Num.TWO, BgfxAttribType.UINT10, UINT10_Vec2
Num.THREE, BgfxAttribType.UINT10, UINT10_Vec3
Num.FOUR, BgfxAttribType.UINT10, UINT10_Vec4
Num.ONE, BgfxAttribType.INT16, INT16_Vec1
Num.TWO, BgfxAttribType.INT16, INT16_Vec2
Num.THREE, BgfxAttribType.INT16, INT16_Vec3
Num.FOUR, BgfxAttribType.INT16, INT16_Vec4
Num.ONE, BgfxAttribType.HALF, HALF_Vec1
Num.TWO, BgfxAttribType.HALF, HALF_Vec2
Num.THREE, BgfxAttribType.HALF, HALF_Vec3
Num.FOUR, BgfxAttribType.HALF, HALF_Vec4
Num.ONE, BgfxAttribType.FLOAT, FLOAT_Vec1
Num.TWO, BgfxAttribType.FLOAT, FLOAT_Vec2
Num.THREE, BgfxAttribType.FLOAT, FLOAT_Vec3
Num.FOUR, BgfxAttribType.FLOAT, FLOAT_Vec4
"public static <E* extends BgfxAttrib> TypedDynamicVertexBuffer$<E*, Num.One, BgfxAttribType.UINT8, UINT_Vec1> create(\n" +
" @NotNull VertexLayoutStruct$<E*, Num.One, BgfxAttribType.UINT8, UINT_Vec1> vertexLayoutOld,\n" +
" int numVertices, @NotNull EnumSet<BGFX_BUFFER> flags) {\n" +
" Assertions.requirePositive(numVertices);\n" +
" final short handle = bgfx_create_dynamic_vertex_buffer(numVertices, vertexLayoutOld.get(), (int) BGFX_BUFFER.flags(flags));\n" +
" final short layoutHandle = bgfx_create_vertex_layout(vertexLayoutOld.get());\n" +
" return new TypedDynamicVertexBuffer$<>(handle, layoutHandle, numVertices);\n" +
"}\n" +