2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-07-02 19:13:43 -04:00

Update to raylib 5.5 (#279)

This commit is contained in:
JupiterRider
2024-12-21 16:00:13 +01:00
committed by GitHub
parent 7b5b322a5b
commit a3dfd57b5a
23 changed files with 504 additions and 124 deletions

View File

@ -61,6 +61,11 @@ public unsafe partial struct VertexBuffer
/// </summary>
public float* TexCoords;
/// <summary>
/// Vertex normal (XYZ - 3 components per vertex) (shader-location = 2)
/// </summary>
public float* Normals;
/// <summary>
/// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
/// </summary>
@ -79,9 +84,9 @@ public unsafe partial struct VertexBuffer
public uint VaoId;
/// <summary>
/// OpenGL Vertex Buffer Objects id (4 types of vertex data)
/// OpenGL Vertex Buffer Objects id (5 types of vertex data)
/// </summary>
public fixed uint VboId[4];
public fixed uint VboId[5];
/// <summary>
/// Access <see cref="Vertices"/>
@ -99,6 +104,14 @@ public unsafe partial struct VertexBuffer
return new(TexCoords, ElementCount * sizeof(float) / sizeof(T));
}
/// <summary>
/// Access <see cref="Normals"/>
/// </summary>
public readonly Span<T> NormalsAs<T>() where T : unmanaged
{
return new(Normals, ElementCount * sizeof(float) / sizeof(T));
}
/// <summary>
/// Access <see cref="Colors"/>
/// </summary>