I think that we should prepare CD3D11MaterialRenderer structures in this way:
1. CD3D11ShaderMaterialRenderer - This material is unnecessary, because all materials in D3D11 are HLSL based.
2. CD3D11MaterialRenderer - Mix between how OGLES2 driver looks and OGL in trunk, so we can put to this material object called CD3D11FixedPipelineShader (look how OGLES2 driver looks in this place we need something similar). Derived materials eg. CD3D11MaterialRenderer_SOLID etc. should look like COpenGLMaterialRenderer_SOLID
from trunk so, we have in them following methods:
Code: Select all
virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services) -> here we call methods from CD3D11FixedPipelineShader.
virtual void OnSetBaseMaterial(const SMaterial& material) -> here we set driver states eg. turn on blending, without calls from CD3D11FixedPipelineShader.
virtual void OnUnsetMaterial() -> Similar to situation from OnSetMaterial.
virtual void OnUnsetBaseMaterial() -> Similar to sitouation from OnSetBaseMaterial.
4. CD3D11HLSLMaterialRenderer structure of this file should look similar to COpenGLSLMaterialRenderer from trunk.
This organization will allow us to unified D3D11 driver to others built-in Irrlicht drivers (in the same way I'll develop OGL3 driver).
BTW. Will be nice to use the same variable names as in other drivers. In D3D11 I saw somewhere BaseRenderer (undefined from compiler perspective). I think that it was BaseMaterial (IMaterialRenderer)