My guess is that one of the DX11 files includes DX10 headers.
But why are you including the DX10.1 header file into a source file that only needs DX11?
Plus, I also believe you are doing it wrong anyway.
Renderer.h (this is an interface class only - has no member variables, does nothing)
#include <wtypes.h>
class Renderer
{
public:
virtual ~Renderer() { }
virtual void Begin() = 0;
virtual void End() = 0;
private:
virtual void Init(UINT Width, UINT Height, bool FullScreen) = 0;
virtual void Shutdown() = 0;
};
DX11Renderer.h (this is an implementation class - has the variables, does everything)
#include "Renderer.h"
#include <D3D11.h>
#include <D3DX11.h>
class DX11Renderer : public Renderer
{
public:
DX11Renderer(UINT Width, UINT Height, bool FullScreen)
{
Init(Width, Height, FullScreen);
}
~DX11Renderer()
{
Shutdown();
}
void Begin();
void End();
private:
void Init(UINT Width, UINT Height, bool FullScreen);
void Shutdown()
ID3D11Device* m_pD3D11Dev;
ID3D11RenderTargetView* m_pRenderTargetView;
ID3D11Texture2D* m_pBackBuffer11;
ID3D11DeviceContext* m_pDeviceContext;
IDXGISwapChain* m_pD3D11SwapChain;
};
main.cpp (how to use it)
#include "DX11Renderer.h"
int main()
{
Renderer* = new Dx11Renderer(800, 600, true);
Renderer->Begin();
// ...
Renderer->End();
delete Renderer;
}
Other renderers would be defined like the DX11Renderer. If you want to include multiple renderers in the same program, and you have header issues like you currently have, then take a look at the pimpl idiom and use that to separate the header inclusion.