diff options
Diffstat (limited to 'src/procedural/generator.h')
| -rw-r--r-- | src/procedural/generator.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/procedural/generator.h b/src/procedural/generator.h new file mode 100644 index 0000000..a5ced68 --- /dev/null +++ b/src/procedural/generator.h @@ -0,0 +1,27 @@ +// This file is part of the 64k demo project. +// It defines the interface for procedural texture generation. +// Used to generate texture data at runtime. + +#pragma once + +#include <cstdint> +#include <vector> + +// Procedural generation function signature +// buffer: Pointer to RGBA8 buffer (size w * h * 4) +// w, h: Dimensions +// params: Arbitrary float parameters for the generator +typedef void (*ProcGenFunc)(uint8_t* buffer, int w, int h, const float* params, + int num_params); + +namespace procedural { + +// Example: Simple noise generator +void gen_noise(uint8_t* buffer, int w, int h, const float* params, + int num_params); + +// Example: Grid pattern +void gen_grid(uint8_t* buffer, int w, int h, const float* params, + int num_params); + +} // namespace procedural |
