add comment on the tex_len calculation

This commit is contained in:
Dragorn421 2025-05-24 22:02:39 +02:00
parent 8186416170
commit 18b0ec6739
No known key found for this signature in database
GPG Key ID: 381AEBAF3D429335
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,8 @@
* `type` is the array's element type
* `width`, `height` are the texture dimensions
* `bpp` is the texture's format's bits-per-pixels
* The calculation computes the size of the texture in bits `width * height * bpp`,
* then divides by 8 to get the size in bytes, then divides by the element type size.
*/
#define TEX_LEN(type, width, height, bpp) ((width) * (height) * (bpp) / 8 / sizeof(type))