This is where the beauty comes in play.
//-- ShaderSystem.h//-- Basestruct Shader {virtual bool CompileShader(ID3D11Device *device, const wchar_t* filename) = 0; ID3D11VertexShader *vertexShader;ID3D11PixelShader *pixelShader;ID3D11GeometryShader *geometryShader;ID3D11ComputeShader *computeShader;ID3D11DomainShader *domainShader:ID3D11HullShader *hullShader;ID3D11InputLayout *inputLayout;};//-- ColorShader.h#include "ShaderSystem.h"struct ColorShader : public Shader {bool CompileShader(ID3D11Device *device, const wchar_t *filename) { //-- Compile Shader.return true;}
and so on with other shaders that I have to work on that may have different elements in the inputlayout e.g. instance data and alike.
I'm still going through a lot of code to see how I can make a lot more readible and less confusing. My original code for the engine was very very confusing and there was a lot of stuff I had to learn before I got to where I am today. This forum actually helped me through a lot of the messy hiccups - amongst reading up new materials.
I'm getting there than I had the year I signed up on here. I don't remember when I singed up here but it was a couple years ago I believe. So I can apply this knowledge to my in-house game engine even more.