Watch
2
0
Fork
You've already forked raylib-cs
0

Updated target to Raylib 6 + synced invoke called with the changes in C. [WARNING: Breaking changes!]

This commit is contained in:
Meatcorps 2026-05-20 21:21:15 +02:00
commit 2a86968da0
11 changed files with 293 additions and 139 deletions

View file

@ -181,38 +181,23 @@ public unsafe struct Mesh
#endregion
#region Animation vertex data
#region Skin data for animation
/// <summary>
/// Animated vertex positions (after bones transformations)
/// Number of bones (MAX: 256 bones)
/// </summary>
public float* AnimVertices = default;
/// <summary>
/// Animated normals (after bones transformations)
/// </summary>
public float* AnimNormals = default;
public int BoneCount;
/// <summary>
/// Vertex bone ids, up to 4 bones influence by vertex (skinning)
/// </summary>
public byte* BoneIds = default;
public byte* boneIndices = default;
/// <summary>
/// Vertex bone weight, up to 4 bones influence by vertex (skinning)
/// </summary>
public float* BoneWeights = default;
/// <summary>
/// Bones animated transformation matrices
/// </summary>
public Matrix4x4* BoneMatrices = default;
/// <summary>
/// Number of bones
/// </summary>
public int BoneCount;
#endregion
#region OpenGL identifiers

View file

@ -21,6 +21,32 @@ public unsafe struct BoneInfo
public int Parent;
}
/// <summary>
/// Skeleton, animation bones hierarchy
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public unsafe struct ModelSkeleton
{
/// <summary>
/// Number of bones
/// </summary>
public int BoneCount;
/// <summary>
/// Bones information (skeleton)
/// </summary>
public BoneInfo* Bones;
/// <summary>
/// Bones base transformation (Transform[])
/// </summary>
public Transform* ModelAnimPose;
}
// Note:
// Anim pose, an array of Transform[]
// typedef Transform *ModelAnimPose; It's just an pointer array.
/// <summary>
/// Model type
/// </summary>

View file

@ -35,7 +35,8 @@ public enum ShaderLocationIndex
MapBrdf,
VertexBoneIds,
VertexBoneWeights,
BoneMatrices,
BoneTransforms,
BoneInstanceTransform,
MapDiffuse = MapAlbedo,
MapSpecular = MapMetalness,