mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Use slices and Odin string where possible due to struct field ordering
This commit is contained in:
Vendored
+36
-84
@@ -403,47 +403,38 @@ material_mapping :: struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
morph_target :: struct {
|
morph_target :: struct {
|
||||||
attributes: [^]attribute,
|
attributes: []attribute,
|
||||||
attributes_count: uint,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
draco_mesh_compression :: struct {
|
draco_mesh_compression :: struct {
|
||||||
buffer_view: ^buffer_view,
|
buffer_view: ^buffer_view,
|
||||||
attributes: [^]attribute,
|
attributes: []attribute,
|
||||||
attributes_count: uint,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mesh_gpu_instancing :: struct {
|
mesh_gpu_instancing :: struct {
|
||||||
buffer_view: ^buffer_view,
|
buffer_view: ^buffer_view,
|
||||||
attributes: [^]attribute,
|
attributes: []attribute,
|
||||||
attributes_count: uint,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
primitive :: struct {
|
primitive :: struct {
|
||||||
type: primitive_type,
|
type: primitive_type,
|
||||||
indices: ^accessor,
|
indices: ^accessor,
|
||||||
material: ^material,
|
material: ^material,
|
||||||
attributes: [^]attribute,
|
attributes: []attribute,
|
||||||
attributes_count: uint,
|
targets: []morph_target,
|
||||||
targets: [^]morph_target,
|
|
||||||
targets_count: uint,
|
|
||||||
extras: extras_t,
|
extras: extras_t,
|
||||||
has_draco_mesh_compression: b32,
|
has_draco_mesh_compression: b32,
|
||||||
draco_mesh_compression: draco_mesh_compression,
|
draco_mesh_compression: draco_mesh_compression,
|
||||||
mappings: [^]material_mapping,
|
mappings: []material_mapping,
|
||||||
mappings_count: uint,
|
|
||||||
extensions_count: uint,
|
extensions_count: uint,
|
||||||
extensions: [^]extension,
|
extensions: [^]extension,
|
||||||
}
|
}
|
||||||
|
|
||||||
mesh :: struct {
|
mesh :: struct {
|
||||||
name: cstring,
|
name: cstring,
|
||||||
primitives: [^]primitive,
|
primitives: []primitive,
|
||||||
primitives_count: uint,
|
weights: []f32,
|
||||||
weights: [^]f32,
|
target_names: []cstring,
|
||||||
weights_count: uint,
|
|
||||||
target_names: [^]cstring,
|
|
||||||
target_names_count: uint,
|
|
||||||
extras: extras_t,
|
extras: extras_t,
|
||||||
extensions_count: uint,
|
extensions_count: uint,
|
||||||
extensions: [^]extension,
|
extensions: [^]extension,
|
||||||
@@ -451,8 +442,7 @@ mesh :: struct {
|
|||||||
|
|
||||||
skin :: struct {
|
skin :: struct {
|
||||||
name: cstring,
|
name: cstring,
|
||||||
joints: [^]^node,
|
joints: []^node,
|
||||||
joints_count: uint,
|
|
||||||
skeleton: ^node,
|
skeleton: ^node,
|
||||||
inverse_bind_matrices: ^accessor,
|
inverse_bind_matrices: ^accessor,
|
||||||
extras: extras_t,
|
extras: extras_t,
|
||||||
@@ -504,14 +494,12 @@ light :: struct {
|
|||||||
node :: struct {
|
node :: struct {
|
||||||
name: cstring,
|
name: cstring,
|
||||||
parent: ^node,
|
parent: ^node,
|
||||||
children: [^]^node,
|
children: []^node,
|
||||||
children_count: uint,
|
|
||||||
skin: ^skin,
|
skin: ^skin,
|
||||||
mesh: ^mesh,
|
mesh: ^mesh,
|
||||||
camera: ^camera,
|
camera: ^camera,
|
||||||
light: ^light,
|
light: ^light,
|
||||||
weights: [^]f32,
|
weights: []f32,
|
||||||
weights_count: uint,
|
|
||||||
has_translation: b32,
|
has_translation: b32,
|
||||||
has_rotation: b32,
|
has_rotation: b32,
|
||||||
has_scale: b32,
|
has_scale: b32,
|
||||||
@@ -529,8 +517,7 @@ node :: struct {
|
|||||||
|
|
||||||
scene :: struct {
|
scene :: struct {
|
||||||
name: cstring,
|
name: cstring,
|
||||||
nodes: [^]^node,
|
nodes: []^node,
|
||||||
nodes_count: uint,
|
|
||||||
extras: extras_t,
|
extras: extras_t,
|
||||||
extensions_count: uint,
|
extensions_count: uint,
|
||||||
extensions: [^]extension,
|
extensions: [^]extension,
|
||||||
@@ -556,10 +543,8 @@ animation_channel :: struct {
|
|||||||
|
|
||||||
animation :: struct {
|
animation :: struct {
|
||||||
name: cstring,
|
name: cstring,
|
||||||
samplers: [^]animation_sampler,
|
samplers: []animation_sampler,
|
||||||
samplers_count: uint,
|
channels: []animation_channel,
|
||||||
channels: [^]animation_channel,
|
|
||||||
channels_count: uint,
|
|
||||||
extras: extras_t,
|
extras: extras_t,
|
||||||
extensions_count: uint,
|
extensions_count: uint,
|
||||||
extensions: [^]extension,
|
extensions: [^]extension,
|
||||||
@@ -586,69 +571,37 @@ data :: struct {
|
|||||||
|
|
||||||
asset: asset,
|
asset: asset,
|
||||||
|
|
||||||
meshes: [^]mesh,
|
meshes: []mesh,
|
||||||
meshes_count: uint,
|
materials: []material,
|
||||||
|
accessors: []accessor,
|
||||||
materials: [^]material,
|
buffer_views: []buffer_view,
|
||||||
materials_count: uint,
|
buffers: []buffer,
|
||||||
|
images: []image,
|
||||||
accessors: [^]accessor,
|
textures: []texture,
|
||||||
accessors_count: uint,
|
samplers: []sampler,
|
||||||
|
skins: []skin,
|
||||||
buffer_views: [^]buffer_view,
|
cameras: []camera,
|
||||||
buffer_views_count: uint,
|
lights: []light,
|
||||||
|
nodes: []node,
|
||||||
buffers: [^]buffer,
|
scenes: []scene,
|
||||||
buffers_count: uint,
|
|
||||||
|
|
||||||
images: [^]image,
|
|
||||||
images_count: uint,
|
|
||||||
|
|
||||||
textures: [^]texture,
|
|
||||||
textures_count: uint,
|
|
||||||
|
|
||||||
samplers: [^]sampler,
|
|
||||||
samplers_count: uint,
|
|
||||||
|
|
||||||
skins: [^]skin,
|
|
||||||
skins_count: uint,
|
|
||||||
|
|
||||||
cameras: [^]camera,
|
|
||||||
cameras_count: uint,
|
|
||||||
|
|
||||||
lights: [^]light,
|
|
||||||
lights_count: uint,
|
|
||||||
|
|
||||||
nodes: [^]node,
|
|
||||||
nodes_count: uint,
|
|
||||||
|
|
||||||
scenes: [^]scene,
|
|
||||||
scenes_count: uint,
|
|
||||||
|
|
||||||
scene: ^scene,
|
scene: ^scene,
|
||||||
|
|
||||||
animations: [^]animation,
|
animations: []animation,
|
||||||
animations_count: uint,
|
|
||||||
|
|
||||||
variants: [^]material_variant,
|
variants: []material_variant,
|
||||||
variants_count: uint,
|
|
||||||
|
|
||||||
extras: extras_t,
|
extras: extras_t,
|
||||||
|
|
||||||
data_extensions_count: uint,
|
data_extensions_count: uint,
|
||||||
data_extensions: [^]extension,
|
data_extensions: [^]extension,
|
||||||
|
|
||||||
extensions_used: [^]cstring,
|
extensions_used: []cstring,
|
||||||
extensions_used_count: uint,
|
extensions_required: []cstring,
|
||||||
|
|
||||||
extensions_required: [^]cstring,
|
json: string,
|
||||||
extensions_required_count: uint,
|
|
||||||
|
|
||||||
json: cstring,
|
bin: []byte,
|
||||||
json_size: uint,
|
|
||||||
|
|
||||||
bin: rawptr,
|
|
||||||
bin_size: uint,
|
|
||||||
|
|
||||||
memory: memory_options,
|
memory: memory_options,
|
||||||
file: file_options,
|
file: file_options,
|
||||||
@@ -658,7 +611,6 @@ data :: struct {
|
|||||||
@(default_calling_convention="c")
|
@(default_calling_convention="c")
|
||||||
@(link_prefix="cgltf_")
|
@(link_prefix="cgltf_")
|
||||||
foreign lib {
|
foreign lib {
|
||||||
|
|
||||||
cgltf_parse :: proc(
|
cgltf_parse :: proc(
|
||||||
options: ^/*const*/options,
|
options: ^/*const*/options,
|
||||||
data_ptr: rawptr,
|
data_ptr: rawptr,
|
||||||
@@ -687,8 +639,8 @@ foreign lib {
|
|||||||
node_transform_local :: proc(node: ^node, out_matrix: [^]f32) ---
|
node_transform_local :: proc(node: ^node, out_matrix: [^]f32) ---
|
||||||
node_transform_world :: proc(node: ^node, out_matrix: [^]f32) ---
|
node_transform_world :: proc(node: ^node, out_matrix: [^]f32) ---
|
||||||
|
|
||||||
accessor_read_float :: proc(accessor: ^/*const*/accessor, index: uint, out: ^f32, element_size: uint) -> b32 ---
|
accessor_read_float :: proc(accessor: ^/*const*/accessor, index: uint, out: [^]f32, element_size: uint) -> b32 ---
|
||||||
accessor_read_uint :: proc(accessor: ^/*const*/accessor, index: uint, out: ^c.uint, element_size: uint) -> b32 ---
|
accessor_read_uint :: proc(accessor: ^/*const*/accessor, index: uint, out: [^]c.uint, element_size: uint) -> b32 ---
|
||||||
accessor_read_index :: proc(accessor: ^/*const*/accessor, index: uint) -> uint ---
|
accessor_read_index :: proc(accessor: ^/*const*/accessor, index: uint) -> uint ---
|
||||||
|
|
||||||
num_components :: proc(type: type) -> uint ---
|
num_components :: proc(type: type) -> uint ---
|
||||||
|
|||||||
Reference in New Issue
Block a user