I am using D3D11, but I'm pretty sure this applies to OpenGL too.
Anyway, I was using D3D10 (which came with an effect framework) and moved to D3D11 (which dumped the effect framework).
Now my rendering classes (spriteBatch, terrainRenderer, billboardRenderer etc...) all have their own pixel shaders, vertex shaders,
constant buffers, sampler states etc... They also had from before their own blendStates, depthStates, rasterizerStates, all of which need to be set before drawing.
Is there some better way to organize this? Some kind of framework that can take care of the various shaders?
And perhaps a framework responsible for the various states of the device (blend, depth etc...)?
Does anyone have any suggestions or basic tutorials on this?
Edited by gfxCahd, 27 January 2014 - 06:59 AM.