1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

sokol: fix examples and remove copy pasta

This commit is contained in:
Alexander Medvednikov
2020-08-23 07:47:50 +02:00
parent 94c3a912ba
commit 542b149290
7 changed files with 42 additions and 55 deletions

View File

@@ -68,15 +68,7 @@ fn (a App) draw() {
}
fn init(user_data voidptr) {
desc := C.sg_desc{
mtl_device: sapp.metal_get_device()
mtl_renderpass_descriptor_cb: sapp.metal_get_renderpass_descriptor
mtl_drawable_cb: sapp.metal_get_drawable
d3d11_device: sapp.d3d11_get_device()
d3d11_device_context: sapp.d3d11_get_device_context()
d3d11_render_target_view_cb: sapp.d3d11_get_render_target_view
d3d11_depth_stencil_view_cb: sapp.d3d11_get_depth_stencil_view
}
desc := sapp.create_desc()
gfx.setup(&desc)
sgl_desc := C.sgl_desc_t{
max_vertices: 50 * 65536