Skip to content

tomwjerry/beef_gltf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

beef_gltf

GLTF importer made in Beef. Requires json tree reader and writer https://github.com/EinScott/json and Base64 encoder / decoder https://github.com/tomwjerry/beef_sead

See the example how to use. Note that the example requires SDL3.

Simply put, this should load a gLTF mesh:

// Make a stucture to load the data
GLTFData gltfData = scope GLTFData();
// This is a helper structure, to retrive data for each mesh.
List<GLTFGPUData> glftgpu = scope List<GLTFGPUData>();
// Loads gLTF data
if (GLTF.LoadFromFile(scope String(BasePath, "Content/Meshes/BarramundiFish.gltf"), gltfData) case .Err)
{
    return;
}
// Helper for a more useful format, but makes some assumptions of data types
if (GLTFGPUData.ConvertToGPUData(gltfData, glftgpu) case .Err)
{
    return;
}
// GLTFGPUData has positions, normals, colors, uvs, indices that can be rendered

About

GLTF importer made in Beef

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors