mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sokol: add missing C
prefixes
This commit is contained in:
@ -46,50 +46,50 @@ pub struct C.sg_pipeline {
|
||||
pub:
|
||||
id u32
|
||||
}
|
||||
pub fn (p C.sg_pipeline) free() { sg_destroy_pipeline(p) }
|
||||
pub fn (p C.sg_pipeline) free() { C.sg_destroy_pipeline(p) }
|
||||
|
||||
|
||||
pub struct C.sg_bindings {
|
||||
pub mut:
|
||||
_start_canary u32
|
||||
vertex_buffers [8]sg_buffer
|
||||
vertex_buffers [8]C.sg_buffer
|
||||
vertex_buffer_offsets [8]int
|
||||
index_buffer sg_buffer
|
||||
index_buffer C.sg_buffer
|
||||
index_buffer_offset int
|
||||
vs_images [8]sg_image
|
||||
fs_images [8]sg_image
|
||||
vs_images [8]C.sg_image
|
||||
fs_images [8]C.sg_image
|
||||
_end_canary u32
|
||||
}
|
||||
|
||||
pub fn (b mut sg_bindings) set_vert_image(index int, img C.sg_image) {
|
||||
pub fn (b mut C.sg_bindings) set_vert_image(index int, img C.sg_image) {
|
||||
b.vs_images[index] = img
|
||||
}
|
||||
|
||||
pub fn (b mut sg_bindings) set_frag_image(index int, img C.sg_image) {
|
||||
pub fn (b mut C.sg_bindings) set_frag_image(index int, img C.sg_image) {
|
||||
b.fs_images[index] = img
|
||||
}
|
||||
|
||||
pub fn (b &C.sg_bindings) update_vert_buffer(index int, data voidptr, element_size int, element_count int) {
|
||||
sg_update_buffer(b.vertex_buffers[index], data, element_size * element_count)
|
||||
C.sg_update_buffer(b.vertex_buffers[index], data, element_size * element_count)
|
||||
}
|
||||
|
||||
pub fn (b &C.sg_bindings) append_vert_buffer(index int, data voidptr, element_size int, element_count int) int {
|
||||
return sg_append_buffer(b.vertex_buffers[index], data, element_size * element_count)
|
||||
return C.sg_append_buffer(b.vertex_buffers[index], data, element_size * element_count)
|
||||
}
|
||||
|
||||
pub fn (b &C.sg_bindings) update_index_buffer(data voidptr, element_size int, element_count int) {
|
||||
sg_update_buffer(b.index_buffer, data, element_size * element_count)
|
||||
C.sg_update_buffer(b.index_buffer, data, element_size * element_count)
|
||||
}
|
||||
|
||||
pub fn (b &C.sg_bindings) append_index_buffer(data voidptr, element_size int, element_count int) int {
|
||||
return sg_append_buffer(b.index_buffer, data, element_size * element_count)
|
||||
return C.sg_append_buffer(b.index_buffer, data, element_size * element_count)
|
||||
}
|
||||
|
||||
|
||||
pub struct C.sg_shader_desc {
|
||||
pub mut:
|
||||
_start_canary u32
|
||||
attrs [16]sg_shader_attr_desc
|
||||
attrs [16]C.sg_shader_attr_desc
|
||||
vs C.sg_shader_stage_desc
|
||||
fs C.sg_shader_stage_desc
|
||||
label byteptr
|
||||
@ -141,7 +141,7 @@ pub fn (desc mut C.sg_shader_desc) set_frag_uniform(block_index int, uniform_ind
|
||||
}
|
||||
|
||||
pub fn (desc &C.sg_shader_desc) make_shader() C.sg_shader {
|
||||
return sg_make_shader(desc)
|
||||
return C.sg_make_shader(desc)
|
||||
}
|
||||
|
||||
|
||||
@ -158,8 +158,8 @@ pub mut:
|
||||
byte_code &byte
|
||||
byte_code_size int
|
||||
entry byteptr
|
||||
uniform_blocks [4]sg_shader_uniform_block_desc
|
||||
images [12]sg_shader_image_desc
|
||||
uniform_blocks [4]C.sg_shader_uniform_block_desc
|
||||
images [12]C.sg_shader_image_desc
|
||||
}
|
||||
|
||||
pub fn (desc mut C.sg_shader_stage_desc) set_image(index int, name string) C.sg_shader_stage_desc {
|
||||
@ -172,7 +172,7 @@ pub fn (desc mut C.sg_shader_stage_desc) set_image(index int, name string) C.sg_
|
||||
pub struct C.sg_shader_uniform_block_desc {
|
||||
pub mut:
|
||||
size int
|
||||
uniforms [16]sg_shader_uniform_desc
|
||||
uniforms [16]C.sg_shader_uniform_desc
|
||||
}
|
||||
|
||||
pub struct C.sg_shader_uniform_desc {
|
||||
@ -198,13 +198,13 @@ pub struct C.sg_shader {
|
||||
pub:
|
||||
id u32
|
||||
}
|
||||
pub fn (s C.sg_shader) free() { sg_destroy_shader(s) }
|
||||
pub fn (s C.sg_shader) free() { C.sg_destroy_shader(s) }
|
||||
|
||||
|
||||
pub struct C.sg_pass_desc {
|
||||
pub mut:
|
||||
_start_canary u32
|
||||
color_attachments [4]sg_attachment_desc
|
||||
color_attachments [4]C.sg_attachment_desc
|
||||
depth_stencil_attachment C.sg_attachment_desc
|
||||
label byteptr
|
||||
_end_canary u32
|
||||
@ -217,16 +217,16 @@ pub struct C.sg_pass_info {
|
||||
pub struct C.sg_pass_action {
|
||||
pub mut:
|
||||
_start_canary u32
|
||||
colors [4]sg_color_attachment_action
|
||||
depth sg_depth_attachment_action
|
||||
stencil sg_stencil_attachment_action
|
||||
colors [4]C.sg_color_attachment_action
|
||||
depth C.sg_depth_attachment_action
|
||||
stencil C.sg_stencil_attachment_action
|
||||
_end_canary u32
|
||||
}
|
||||
|
||||
pub struct C.sg_pass {
|
||||
id u32
|
||||
}
|
||||
pub fn (p C.sg_pass) free() { sg_destroy_pass(p) }
|
||||
pub fn (p C.sg_pass) free() { C.sg_destroy_pass(p) }
|
||||
|
||||
|
||||
pub struct C.sg_buffer_desc {
|
||||
@ -251,7 +251,7 @@ pub struct C.sg_buffer_info {}
|
||||
pub struct C.sg_buffer {
|
||||
id u32
|
||||
}
|
||||
pub fn (b C.sg_buffer) free() { sg_destroy_buffer(b) }
|
||||
pub fn (b C.sg_buffer) free() { C.sg_destroy_buffer(b) }
|
||||
|
||||
|
||||
pub union DepthLayers {
|
||||
@ -309,12 +309,12 @@ pub struct C.sg_image {
|
||||
pub:
|
||||
id u32
|
||||
}
|
||||
pub fn (i C.sg_image) free() { sg_destroy_image(i) }
|
||||
pub fn (i C.sg_image) free() { C.sg_destroy_image(i) }
|
||||
|
||||
|
||||
pub struct C.sg_image_content {
|
||||
pub mut:
|
||||
subimage [6][16]sg_subimage_content
|
||||
subimage [6][16]C.sg_subimage_content
|
||||
}
|
||||
|
||||
pub struct C.sg_subimage_content {
|
||||
@ -346,8 +346,8 @@ pub:
|
||||
|
||||
pub struct C.sg_layout_desc {
|
||||
pub mut:
|
||||
buffers [8]sg_buffer_layout_desc
|
||||
attrs [16]sg_vertex_attr_desc
|
||||
buffers [8]C.sg_buffer_layout_desc
|
||||
attrs [16]C.sg_vertex_attr_desc
|
||||
}
|
||||
|
||||
pub struct C.sg_buffer_layout_desc {
|
||||
|
Reference in New Issue
Block a user