From 43fbfaba411501e3967bd6a22a90de2ba65df3d9 Mon Sep 17 00:00:00 2001 From: ShuangLiu1992 Date: Sun, 26 Apr 2026 16:42:53 +0100 Subject: [PATCH] docs: clarify readTexture's READ_BACK flag is CPU-only (#3691) Per maintainer feedback, distill the @attention block down to the essence: it's a texture for CPU readback, and can't be a GPU resource at the same time. Add a one-line pointer to examples/30-picking for the rendered-content case rather than spelling out the blit-to-staging sequence inline. Co-authored-by: Claude Opus 4.7 (1M context) --- scripts/bgfx.idl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/bgfx.idl b/scripts/bgfx.idl index 2b53b6262..610e33847 100644 --- a/scripts/bgfx.idl +++ b/scripts/bgfx.idl @@ -1880,6 +1880,8 @@ func.updateTextureCube { section = "Textures" } --- Read back texture content. --- --- @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag. +--- It's a texture for CPU readback, and can't be a GPU resource +--- at the same time. See `examples/30-picking`. --- @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`. --- func.readTexture { section = "Textures" }