mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: fix #3973 by dealing with name mangling problem
This commit is contained in:
@ -56,13 +56,13 @@ __global g_font_path string
|
||||
|
||||
fn init_sokol_window() {
|
||||
desc := sg_desc{
|
||||
mtl_device: C.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
|
||||
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
|
||||
}
|
||||
gfx.setup(&desc)
|
||||
sgl_desc := sgl_desc_t{}
|
||||
@ -138,20 +138,20 @@ pub fn (gg &GG) run() {
|
||||
pub fn (ctx &GG) draw_rect(x, y, w, h f32, c gx.Color) {
|
||||
sgl.c4b(c.r, c.g, c.b, 128)
|
||||
sgl.begin_quads()
|
||||
sgl_v2f(x, y)
|
||||
sgl_v2f(x + w, y)
|
||||
sgl_v2f(x + w, y + h)
|
||||
sgl_v2f(x, y + h)
|
||||
sgl.v2f(x, y)
|
||||
sgl.v2f(x + w, y)
|
||||
sgl.v2f(x + w, y + h)
|
||||
sgl.v2f(x, y + h)
|
||||
sgl.end()
|
||||
}
|
||||
|
||||
pub fn draw_rect(x, y, w, h f32, c gx.Color) {
|
||||
sgl.c4b(c.r, c.g, c.b, 128)
|
||||
sgl.begin_quads()
|
||||
sgl_v2f(x, y)
|
||||
sgl_v2f(x + w, y)
|
||||
sgl_v2f(x + w, y + h)
|
||||
sgl_v2f(x, y + h)
|
||||
sgl.v2f(x, y)
|
||||
sgl.v2f(x + w, y)
|
||||
sgl.v2f(x + w, y + h)
|
||||
sgl.v2f(x, y + h)
|
||||
sgl.end()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user