-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsokol_glue.nelua
21 lines (20 loc) · 1014 Bytes
/
sokol_glue.nelua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- This file should be required after sokol_app and sokol_gfx.
global function sapp_sgcontext(): sg_context_desc
local desc: sg_context_desc
desc.color_format = (@sg_pixel_format)(sapp_color_format())
desc.depth_format = (@sg_pixel_format)(sapp_depth_format())
desc.sample_count = sapp_sample_count()
desc.gl.force_gles2 = sapp_gles2()
desc.metal.device = sapp_metal_get_device()
desc.metal.renderpass_descriptor_cb = sapp_metal_get_renderpass_descriptor
desc.metal.drawable_cb = sapp_metal_get_drawable
desc.d3d11.device = sapp_d3d11_get_device()
desc.d3d11.device_context = sapp_d3d11_get_device_context()
desc.d3d11.render_target_view_cb = sapp_d3d11_get_render_target_view
desc.d3d11.depth_stencil_view_cb = sapp_d3d11_get_depth_stencil_view
desc.wgpu.device = sapp_wgpu_get_device()
desc.wgpu.render_view_cb = sapp_wgpu_get_render_view
desc.wgpu.resolve_view_cb = sapp_wgpu_get_resolve_view
desc.wgpu.depth_stencil_view_cb = sapp_wgpu_get_depth_stencil_view
return desc
end