Closed vincent23 closed 8 years ago
We're going for an even simpler solution for now:
There is a reserved number of texture units (say 20) for loaded textures.
Every png file in the texture directory is loaded and gets is texture number from sorting the list by filename.
In the shader you can just choose the texture with layout(binding = …)
.
The exporter creates header files with arrays directly loadable by glTexImage2D.
Export and runtime support is still missing.
One simple solution:
One (or a few) fixed texture "slots" in the shader. Which actual texture is bound to a slot is controlled by a numeric parameter. Images for use as textures are placed in a special subdirectory of the project. Each filename should be a number to enable simple mapping from parameter value to texture.