Untitled
Loading...
Searching...
No Matches
gltf.h File Reference

GLTF parsing related utilities and important initialization data for Meshes, MeshNodes, and Materials. More...

Go to the source code of this file.

Functions

void load_gltf (const char *gltf_path)
 Loads a GLTF.

Detailed Description

GLTF parsing related utilities and important initialization data for Meshes, MeshNodes, and Materials.

Definition in file gltf.h.

Function Documentation

◆ load_gltf()

void load_gltf ( const char * gltf_path)

Loads a GLTF.

Parameters
Thepath and file name of a GLTF.

Definition at line 1250 of file gltf.c.

References Asset::aabb, Mesh::aabb, MeshNode::aabb, Material::absorption_coefficients, GLTFDoc::accessors, Material::alpha_cutoff, Material::alpha_mode, Asset::animation_count, GLTFDoc::animation_count, GLTFSkin::animation_indices, GLTFSkin::animation_indices_count, Asset::animations, GLTFDoc::animations, Material::ao_strength, Material::ao_tex, apply_static_mesh_to_children(), Material::arm_tex, Animation::asset_id, Asset::asset_id, Mesh::asset_id, Globals::assets, AUDIO_NUM_BANDS, Vector::buffer, GLTFDoc::bufferCount, GLTFDoc::buffers, GLTFAccessor::bufferView, build_animation(), GLTFAccessor::byteOffset, calculate_aabb_extents(), CAST_VEC, Animation::channel_count, Animation::channels, GLTFAnimation::channels, MeshNode::child_count, MeshNode::children, compute_all_node_globals(), compute_tri_normal(), GLTFAccessor::count, Vector::count, GLTFBuffer::data, DEFAULT_ARM, determine_aabb_of_children(), Material::diffuse_tex, Material::double_sided, SubMesh::draw_offset, Material::emissive_strength, Material::emissive_tex, MeshNode::ent, fetch_index(), fetch_joints4_from_accessor(), fetch_vec2f(), fetch_vec3f(), fetch_vec4(), fetch_weights4_from_accessor(), GLTFSkin::final_mat, SubMesh::first_index, SubMesh::first_vertex, GLTFMaterial::fwd_shader, Material::fwd_shader, GLTFMaterial::gbuffer_shader, Material::gbuffer_shader, MeshNode::global_matrix, GLOBALS, GLTFSkin::ibm_accessor, Mesh::id, MeshNode::id, GLTFDoc::images, SubMesh::index_count, GLTFPrimitive::indices, MeshFace::indices, init_mesh(), init_vector(), GLTFSkin::inverse_bind, GLTFSkin::joint_count, GLTFSkin::joints, Point::joints, GLTFPrimitive::joints0, Material::ka, Material::kd, Material::ke, Material::ks, SubMesh::lm_offset, load_gltf(), load_gltf_texture(), m4_inverse(), GLTFPrimitive::material, material, SubMesh::material, GLTFDoc::material_count, MeshFace::material_id, Globals::materials, GLTFDoc::materials, MAX_ANIMATION_INDICES, AABB::max_x, AABB::max_y, AABB::max_z, MeshNode::mesh, Asset::mesh_indices, Globals::mesh_nodes, GLTFDoc::meshCount, Globals::meshes, GLTFDoc::meshes, Material::metallic, AABB::min_x, AABB::min_y, AABB::min_z, Material::mr_tex, GLTFAnimation::name, GLTFSkin::name, Material::name, Mesh::name, MeshNode::name, Asset::node_count, GLTFDoc::node_count, Asset::nodes, GLTFDoc::nodes, GLTFPrimitive::normal, MeshFace::normal, Point::normal, Material::normal_scale, Material::normal_tex, Material::override_arm, Material::override_transparent, MeshNode::parent, parse_gltf_json(), Asset::path, MeshNode::pc, Point::pos, GLTFPrimitive::position, GLTFMesh::primCount, GLTFMesh::prims, remap_joints_to_skin(), Material::roughness, Animation::samplers, GLTFAnimation::samplers, GLTFDoc::samplers, Material::scattering_coefficients, MeshNode::skin, Asset::skin_count, GLTFDoc::skin_count, Asset::skins, GLTFDoc::skins, Mesh::static_mesh, MeshNode::static_mesh, Mesh::submeshes, GLTFPrimitive::tangent, Point::tangent, GLTFAnimationChannel::target_node, GLTFPrimitive::texcoord0, GLTFDoc::textures, Mesh::tris, GLTFBuffer::uri, UV, Point::uv, MeshNode::uv_map, vec3_normalize(), vec3_to_vec4(), vec4_to_vec3(), vector_expand(), SubMesh::vertex_count, Mesh::vertices, view, GLTFDoc::views, vec4::w, Point::weights, GLTFPrimitive::weights0, vec3::x, vec3::y, and vec3::z.

Referenced by load_gltf(), main(), and render_main_menu().