cgltf-CSharp 1.13.0.1

dotnet add package cgltf-CSharp --version 1.13.0.1
NuGet\Install-Package cgltf-CSharp -Version 1.13.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="cgltf-CSharp" Version="1.13.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add cgltf-CSharp --version 1.13.0.1
#r "nuget: cgltf-CSharp, 1.13.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install cgltf-CSharp as a Cake Addin
#addin nuget:?package=cgltf-CSharp&version=1.13.0.1

// Install cgltf-CSharp as a Cake Tool
#tool nuget:?package=cgltf-CSharp&version=1.13.0.1

cgltf-CSharp

C# bindings for https://github.com/jkuhlmann/cgltf with native dynamic link libraries based on imgui-cs.

How to use

using System;
using System.Threading;
using bottlenoselabs.C2CS.Runtime;
using static cgltf.PInvoke;


internal sealed class Program
{
    internal static unsafe void Main(string[] args)
    {
        CgltfOptions options = default;
        CgltfData* data;

        CString path = (CString)"Box.glb";

        CgltfResult result = CgltfParseFile(&options, path, &data);

        if (result == CgltfResult.CgltfResultSuccess)
        {
            result = CgltfLoadBuffers(&options, data, path);
        }

        if (result == CgltfResult.CgltfResultSuccess)
        {
            result = CgltfValidate(data);
        }

        Console.WriteLine($"Result: {result}");

        if (result == CgltfResult.CgltfResultSuccess)
        {
            Console.WriteLine($"Type: {data->FileType}");
            Console.WriteLine($"Meshes: {data->MeshesCount.Data}");
        }

        CgltfFree(data);
        Console.ReadKey();
    }

}

Developers: Documentation

For more information on how C# bindings work, see C2CS, the tool that generates the bindings for cgltf and other C libraries.

To learn how to use cgltf, check out the official readme.

License

cgltf-CSharp is licensed under the MIT License (MIT) - see the LICENSE file for details.

cgltf itself is licensed under MIT license (MIT) - see https://github.com/jkuhlmann/cgltf/blob/master/LICENSE for more details.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.13.0.1 253 10/24/2023