diff --git a/Raylib-cs/types/Raylib.Utils.cs b/Raylib-cs/types/Raylib.Utils.cs
index 9231fb6..1f77bb8 100644
--- a/Raylib-cs/types/Raylib.Utils.cs
+++ b/Raylib-cs/types/Raylib.Utils.cs
@@ -652,6 +652,36 @@ namespace Raylib_cs
return LoadTexture(str1.AsPointer());
}
+ /// Update GPU texture with new data
+ public static void UpdateTexture(Texture2D texture, T[] pixels) where T : unmanaged
+ {
+ UpdateTexture(texture, (ReadOnlySpan)pixels);
+ }
+
+ /// Update GPU texture with new data
+ public static void UpdateTexture(Texture2D texture, ReadOnlySpan pixels) where T : unmanaged
+ {
+ fixed (void* pixelPtr = pixels)
+ {
+ UpdateTexture(texture, pixelPtr);
+ }
+ }
+
+ /// Update GPU texture rectangle with new data
+ public static void UpdateTextureRec(Texture2D texture, Rectangle rec, T[] pixels) where T : unmanaged
+ {
+ UpdateTextureRec(texture, rec, (ReadOnlySpan)pixels);
+ }
+
+ /// Update GPU texture rectangle with new data
+ public static void UpdateTextureRec(Texture2D texture, Rectangle rec, ReadOnlySpan pixels) where T : unmanaged
+ {
+ fixed (void* pixelPtr = pixels)
+ {
+ UpdateTextureRec(texture, rec, pixelPtr);
+ }
+ }
+
/// Generate GPU mipmaps for a texture
public static void GenTextureMipmaps(ref Texture2D texture)
{