Commit Graph
14 Commits
Author SHA1 Message Date
Mathias Agopian cc13420e31 add missing includes
Should fix #3633
2021-03-15 22:45:31 -07:00
Philip Rideout 3226b20ece resgen: add --json option.
This option embeds a small JSON string inside the resgen blob that lists
all materials and their respective sizes. This is useful when analyzing
the footprint of the binary executable.
2020-12-06 14:36:13 -08:00
Romain Guy 14ce9e30b9 Make the build more quiet (#2457)
* Make the build more quiet

* Add mising include
2020-04-25 01:13:30 -07:00
Ben Doherty b28e535540 Combine license file generation functions for MSVC compatability (#1684) 2019-09-24 12:45:38 -07:00
Philip Rideout 2a2974580c resgen: remove unused / incorrect constant. 2019-09-10 10:19:37 -07:00
Philip Rideout 8d1b630b24 resgen: repair wasm builds. 2019-09-10 08:02:35 -07:00
Philip Rideout 1235a66f83 resgen: avoid overwriting the header if nothing changed. 2019-09-10 08:02:35 -07:00
Philip Rideout 411e7f4511 resgen: use extern int instead of #define. 2019-09-10 08:02:35 -07:00
Philip Rideout 20680e8170 Improve resgen speed and avoid using static.
(1)
Generating the C file (only used for WebAssembly) causes slowness in the
build so this makes it into an option. Also, we were flushing too often,
which made it even slower.

(2)
Using "static" in a header was causing symbol duplication.
2018-11-29 17:21:27 -08:00
Philip Rideout 239317ee10 Use resgen for libshaders. 2018-11-29 07:37:56 -08:00
Philip Rideout 12754fd7eb Minor resgen improvements.
This adds a couple optional features:

1) Preserve file extensions when generating symbols.
   This is useful to distinguish foo.vs from foo.fs

2) Append null characters to data blobs.
   Useful when treating FOO_DATA as a C string.
2018-11-28 16:58:41 -08:00
Philip Rideout 30092dc12b Add style guidelines for strings.
This also adds the std:: qualifier to resgen (see also PR #356)
2018-11-27 09:05:57 -08:00
Philip Rideout 0807cfbaaa Fix Windows build. 2018-11-21 22:14:22 -08:00
Philip Rideout e90b53fdce Introduce resgen tool for embedding binary blobs.
This tool can be used to replace inc files for built-in materials. The
inc files are unfriendly to IDE's and do not extend to non-material
resource types such as baked texture data.

The tool 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 resource
    resources.S ......... small assembly file with incbin directive
    resources.apple.S ... ditto but with different rodata name
    resources.bin ....... the aggregated binary blob
    resources.c ......... large xxd-style array (only for WASM)

We did an experiment to test the incbin directive on a variety of
platforms in PR #510.
2018-11-21 17:18:21 -08:00