mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
fmt: fix alignment of struct init fields (#22025)
This commit is contained in:
parent
99da5726db
commit
c51d30bf53
671 changed files with 18817 additions and 18787 deletions
|
@ -139,7 +139,7 @@ pub fn (mut b Bindings) set_frag_image(index int, img Image) {
|
|||
|
||||
pub fn (b &Bindings) update_vert_buffer(index int, data voidptr, element_size int, element_count int) {
|
||||
range := Range{
|
||||
ptr: data
|
||||
ptr: data
|
||||
size: usize(element_size * element_count)
|
||||
}
|
||||
C.sg_update_buffer(b.vertex_buffers[index], &range)
|
||||
|
@ -147,7 +147,7 @@ pub fn (b &Bindings) update_vert_buffer(index int, data voidptr, element_size in
|
|||
|
||||
pub fn (b &Bindings) append_vert_buffer(index int, data voidptr, element_size int, element_count int) int {
|
||||
range := Range{
|
||||
ptr: data
|
||||
ptr: data
|
||||
size: usize(element_size * element_count)
|
||||
}
|
||||
return C.sg_append_buffer(b.vertex_buffers[index], &range)
|
||||
|
@ -155,7 +155,7 @@ pub fn (b &Bindings) append_vert_buffer(index int, data voidptr, element_size in
|
|||
|
||||
pub fn (b &Bindings) update_index_buffer(data voidptr, element_size int, element_count int) {
|
||||
range := Range{
|
||||
ptr: data
|
||||
ptr: data
|
||||
size: usize(element_size * element_count)
|
||||
}
|
||||
C.sg_update_buffer(b.index_buffer, &range)
|
||||
|
@ -163,7 +163,7 @@ pub fn (b &Bindings) update_index_buffer(data voidptr, element_size int, element
|
|||
|
||||
pub fn (b &Bindings) append_index_buffer(data voidptr, element_size int, element_count int) int {
|
||||
range := Range{
|
||||
ptr: data
|
||||
ptr: data
|
||||
size: usize(element_size * element_count)
|
||||
}
|
||||
return C.sg_append_buffer(b.index_buffer, &range)
|
||||
|
|
|
@ -9,7 +9,7 @@ __global g_desc C.sapp_desc
|
|||
|
||||
pub fn create_desc() gfx.Desc {
|
||||
return gfx.Desc{
|
||||
environment: glue_environment()
|
||||
environment: glue_environment()
|
||||
image_pool_size: 1000
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ pub fn create_desc() gfx.Desc {
|
|||
// create_default_pass creates a default `gfx.Pass` compatible with `sapp` and `sokol.gfx.begin_pass/1`.
|
||||
pub fn create_default_pass(action gfx.PassAction) gfx.Pass {
|
||||
return gfx.Pass{
|
||||
action: action
|
||||
action: action
|
||||
swapchain: glue_swapchain()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@ pub fn screenshot_window() &Screenshot {
|
|||
img_pixels := unsafe { &u8(malloc(img_size)) }
|
||||
C.v_sapp_gl_read_rgba_pixels(0, 0, img_width, img_height, img_pixels)
|
||||
return &Screenshot{
|
||||
width: img_width
|
||||
width: img_width
|
||||
height: img_height
|
||||
size: img_size
|
||||
size: img_size
|
||||
pixels: img_pixels
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,13 +10,13 @@ pub fn create(width int, height int, flags int) &fontstash.Context {
|
|||
assert is_power_of_two(width)
|
||||
assert is_power_of_two(height)
|
||||
allocator := C.sfons_allocator_t{
|
||||
alloc_fn: memory.salloc
|
||||
free_fn: memory.sfree
|
||||
alloc_fn: memory.salloc
|
||||
free_fn: memory.sfree
|
||||
user_data: voidptr(0x100005f0)
|
||||
}
|
||||
desc := C.sfons_desc_t{
|
||||
width: width
|
||||
height: height
|
||||
width: width
|
||||
height: height
|
||||
allocator: allocator
|
||||
}
|
||||
return C.sfons_create(&desc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue