#pragma once
#include "Device.h"
#include "Surface.h"
#include "ComPtr.h"

#ifdef GUI_WIN32

namespace gui {

	/**
	 * This is a DirectX device. Supports both 2D and 3D rendering.
	 */
	class DXDevice : public Device {
	public:
		// Create.
		DXDevice(Engine &e);

		// Create a surface.
		virtual Surface *createSurface(Handle window, SurfaceType type);

		// Create a text manager.
		virtual TextMgr *createTextMgr();

		// Engine.
		Engine &e;

		// Factories.
		ComPtr<ID2D1Factory> factory;
		ComPtr<IDXGIFactory> giFactory;

		// D3D device and DXGI device.
		ComPtr<ID3D10Device1> device;
		ComPtr<IDXGIDevice> giDevice;

	private:
		// The ID allocated for the device.
		Nat myId;
	};

}

#endif
