• entries
    31
  • comments
    59
  • views
    35495

Another great way to reduce my insantiy with interfaces...

Sign in to follow this  
Followers 0
Paul C Skertich

799 views

Upon revising the engine's SDK - I finally understood how powerful creating interfaces can truely be! Say inside the level editor the grid outline outputs color - the skybox outputs texture data - meshes output a material shader and billboards output with a geometry shader.

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.

2
Sign in to follow this  
Followers 0


0 Comments


There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now