diff --git a/Raylib-cs/types/RenderBatch.cs b/Raylib-cs/types/RenderBatch.cs index 0253d5a..7b08ff0 100644 --- a/Raylib-cs/types/RenderBatch.cs +++ b/Raylib-cs/types/RenderBatch.cs @@ -28,6 +28,11 @@ public unsafe partial struct RenderBatch /// public DrawCall* Draws; + /// + /// Draw calls counter + /// + public int DrawCounter; + /// /// Current depth value for next draw /// @@ -76,6 +81,30 @@ public unsafe partial struct VertexBuffer /// OpenGL Vertex Buffer Objects id (4 types of vertex data) /// public fixed uint VboId[4]; + + /// + /// Access + /// + public readonly Span VerticesAs() where T : unmanaged + { + return new(Vertices, ElementCount * sizeof(float) / sizeof(T)); + } + + /// + /// Access + /// + public readonly Span TexCoordsAs() where T : unmanaged + { + return new(TexCoords, ElementCount * sizeof(float) / sizeof(T)); + } + + /// + /// Access + /// + public readonly Span ColorsAs() where T : unmanaged + { + return new(Colors, ElementCount * sizeof(byte) / sizeof(T)); + } } ///