Closed volcoma closed 1 year ago
I believe creating something like BinWriter and wrap everything else in a func should do the trick. something like
int main(int _argc, const char* _argv[])
{
// check some args and use any of these
//BinWriter writer;
//CrtFileWriter writer;
//Bin2cWriter writer;
int result = compile(&writer, _argc, _argv);
// the user can hook here with writer.getMemory or smth
}
So would it be possible to add an option to shaderc to not write anything to a file but instead return the compiled memory to the user. This would be great for texturec and geometryc as well. This would make runtime compilation much easier and allow the user to serialize the data in any way he sees fit e.g to a database or to create a single file containing all the different dx9, dx11, opengl ... binaries or something else.