FILAMENT-RESGEN(1)
πΈ FILAMENT-RESGEN(1) πΈ
okay so bestie, welcome to filament-resgen(1) β it lives in the User Commands part of the manual, and it's literally the filament material tools page. grab a snack, we're doing this π
β¨ NAME β¨
filament-resgen β filament material tools. that's it, that's the name section, she's short and she's iconic π
π¦ DESCRIPTION π¦
so filament-resgen takes a whole lil sequence of binary blobs and aggregates them, and each one of those blobs becomes a "resource" β and the resource's id? it's literally just the basename of the input file. no cap. π«Ά
and then it produces this whole set of files, and yes I'm listing every single one because we don't do skipping here:
resources.hβ declares sizes and offsets for each resourceresources.Sβ a small assembly file with anincbindirective and arodatasectionresources.apple.Sβ ditto, but with a differentrodataname and underscore prefixesresources.binβ the aggregated binary blob that theincbinactually refers to
π§ Usage:
filament-resgen [options] <input_file_0> <input_file_1> ...
like, you give it options, then you give it files, and it eats them all up π
π OPTIONS π
okay here's the menu, every single flag, zero crumbs left behind:
--help,-hβ Print this message--license,-Lβ Print copyright and license information--package=string,-p stringβ Name of the resource package (defaults to"resources"). This is used to generate filenames and symbol prefixes--deploy=dir,-x dir(defaults to".") β Generate everything needed for deployment into<dir>--keep,-kβ Keep file extensions when generating symbols--text,-tβ Append a null terminator to each data blob--cfile,-cβ Generate xxd-style C file (useful for WebAssembly)--json,-jβ Embed a JSON string in the output that provides a summary of all resource sizes and names. Useful for size analysis.--quiet,-qβ Suppress console output--help,-hβ Print this message--license,-Lβ Print copyright and license information--package=string,-p stringβ Name of the resource package (defaults to"resources"). This is used to generate filenames and symbol prefixes--deploy=dir,-x dir(defaults to".") β Generate everything needed for deployment into<dir>--keep,-kβ Keep file extensions when generating symbols--text,-tβ Append a null terminator to each data blob--cfile,-cβ Generate xxd-style C file (useful for WebAssembly)--json,-jβ Embed a JSON string in the output that provides a summary of all resource sizes and names. Useful for size analysis.--quiet,-qβ Suppress console output
not me pointing out that the page says all of that twice β and bestie, I'm not skipping a single crumb of it, so here it is again, the whole thing, twice as much slay π
π₯ EXAMPLES π₯
resgen -cp textures jungle.png beach.png
> Generated files: textures.h, textures.S, textures.apple.S, textures.bin, textures.c
> Generated symbols: TEXTURES_JUNGLE_DATA, TEXTURES_JUNGLE_SIZE,
TEXTURES_BEACH_DATA, TEXTURES_BEACH_SIZE
look at her go π -cp = cfile + package, and boom, files and symbols, main character energy fr fr π
and then the page just... says the whole thing again. so here's round two, verbatim, no edits:
resgen aggregates a sequence of binary blobs, each of which becomes a "resource" whose id is the basename of the input file. It produces the following set of files:
resources.hβ declares sizes and offsets for each resourceresources.Sβ small assembly file withincbindirective androdatasectionresources.apple.Sβ ditto but with differentrodataname and underscore prefixesresources.binβ the aggregated binary blob that theincbinrefers to
π Usage:
resgen [options] <input_file_0> <input_file_1> ...
resgen -cp textures jungle.png beach.png
> Generated files: textures.h, textures.S, textures.apple.S, textures.bin, textures.c
> Generated symbols: TEXTURES_JUNGLE_DATA, TEXTURES_JUNGLE_SIZE,
TEXTURES_BEACH_DATA, TEXTURES_BEACH_SIZE
iykyk π
ok that's the whole page, every flag, every file, every symbol, nothing dropped, periodt π
and the cute sign-off, bestie: this one's from resgen, dated October 2021, sitting in the FILAMENT-RESGEN(1) spot in the manual. bye ilysm, go aggregate something pretty β¨π¦π
π¦ where this page comes from
- debian bookworm: libfilament-tools 1.9.25+dfsg2-10 Β· Apache-2.0
- debian trixie: libfilament-tools 1.9.25+dfsg3-1+b2 Β· Apache-2.0
- ubuntu jammy: libfilament-tools 1.9.25+dfsg2-4build1 Β· Apache-2.0
- ubuntu questing: libfilament-tools 1.9.25+dfsg3-1
- ubuntu resolute: libfilament-tools 1.9.25+dfsg3-3build2 Β· Apache-2.0
- ubuntu stonking: libfilament-tools 1.9.25+dfsg3-3build2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms