S3D_PUSH_TEXTURES(3)

✨ S3D_PUSH_TEXTURES ✨

okay bestie, welcome to the s3d manual, section 3 β€” and today's main character is s3d_push_textures, aka the "push many textures" girlie πŸŽ€ she's giving bulk efficiency energy and honestly? obsessed.


🌸 NAME 🌸

s3d_push_textures β€” push many textures πŸ¦‹

like. MANY. textures. at once. plural. a whole squad. πŸ’…


✨ SYNOPSIS ✨

#include <s3d.h>

int s3d_push_textures(int object, const uint16_t *tbuf, uint16_t n);

that's it, that's the whole vibe check. one include, one function, three args, no cap. 🫢


πŸ’– DESCRIPTION πŸ’–

so here's the tea, bestie β˜• β€” same situation as with vertices, okay? if you've got a whole pile of textures to deal with, you can push arrays of textures onto the texture stack and get greater performance out of it. it's the "don't do it one at a time when you could do it all at once" pipeline, and she ATE. πŸ”₯

and the way tbuf works? okay so listen closely πŸ™ˆ β€” tbuf should contain n texture sizes. and each one of those texture sizes is made up of 2 uint16_t values: one for the width and one for the height, for each texture. so it's like a lil width-height duo per texture, lined up one after another, and n tells her how many of those duos to expect. iconic structure, honestly. ⭐

so like: n textures in, n pairs of uint16_t out, everybody's sized, everybody's on the stack, everybody's thriving. 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Simon Wunderlich Author of s3d πŸ’œ

(he literally wrote s3d. king behaviour. we love to see it. πŸŽ€)


and that's a wrap, bestie!! this page came to you straight from the s3d manual, section 3, S3D_PUSH_TEXTURES(3) β€” and ngl there's no date on this thing so she's simply timeless, an eternal queen, periodt. πŸ’…βœ¨πŸ¦‹πŸ’– go push some textures, ily, bye!! 🌸🫢⭐