Evening all, my brain got stuck on an unnecessary API design question the other day in working through Handmade Hero Day 241 and 241 learning the benefits to this setup.
Casey uses the three tier architecture between Win32, Game Code and OpenGL specifics. If you were working this architecture in a multi-use engine, and were allowing the developer on the game code side to write their own shader without exposing the OpenGL tier, would you expose a CreateShader(u32 Index, char* VCode, char* GCode, char* PCode, etc...) through the platform/render API globals attached to the GameMemory struct, add it as a new RenderCommand type during initialization, or a totally different approach?
Would the game code side hold the reference to these shaders, or would the "engine" side manage an array of shaders that the game code side could grab by an index or char name?
Thanks in advance for the thoughts on this.
-Mebourne