Jump to content
  • Advertisement
  • entries
  • comments
  • views

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

Sign in to follow this  
Paul C Skertich


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.
Sign in to follow this  


Recommended 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
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!