diff --git a/docs/PORTING.md b/docs/PORTING.md index 79ba38ad..bd5fff1b 100644 --- a/docs/PORTING.md +++ b/docs/PORTING.md @@ -780,7 +780,7 @@ binding over a `const char *` cursor meets it. > **Closed, 2026-09-25.** `((Ptr U) p)` casts a pointer's element type, spelled as `(i32 x)` > is, and checks nothing; it may add const and may not drop it. The example's call is now -> `(rl/update-texture texture ((Ptr u8) pixels))` and `update-texture-colors` is gone. There is +> `(rl/update-texture texture ((Ptr u8) pixels))`; `update-texture-colors` stays as a one-line defn over the cast. There is > still no cast between a pointer and an integer, and no pointer arithmetic. diff --git a/vendor/raylib/raylib.flan b/vendor/raylib/raylib.flan index defa08c7..5a085a9f 100644 --- a/vendor/raylib/raylib.flan +++ b/vendor/raylib/raylib.flan @@ -619,6 +619,11 @@ (declare-c unload-texture [texture Texture2D] "UnloadTexture") +;; UpdateTexture over a Color buffer, such as the one LoadImageColors answers. +;; The generated update-texture takes the `const void *` as (Ptr const u8). +(defn update-texture-colors [texture Texture2D pixels (Ptr Color)] () + (update-texture texture ((Ptr u8) pixels))) + ;; How a texture is sampled when it is drawn at anything other than its own ;; size. The header says `int` on SetTextureFilter and means one of these six. ;;