#pragma once
#ifdef BKSCRDLL_EXPORTS
#define BKSCRDLL_API __declspec(dllexport)
#else
#define BKSCRDLL_API __declspec(dllimport)
#endif

// Этот класс экспортирован из BKScreenD2D.dll
#include "Screen_Shared.h"

#include <d2d1.h>
#include <d2d1helper.h>

EXTERN_C class BKSCRDLL_API CScreenD2D : public CBKScreen_Shared
{
	protected:

		ID2D1Factory       *m_pDirect2dFactory;
		ID2D1HwndRenderTarget *m_pRenderTarget, *m_pRenderTargetFS, *m_pCurrentRenderTarget;
		ID2D1Bitmap        *m_pBitmap;

		UINT32              m_nPitch;

		D2D1_RECT_F         m_rectFSWnd_f; //размеры viewportа в полноэкранном режиме
		D2D1_RECT_F         m_rectWnd_f; //размеры viewportа в оконном режиме
		D2D1_RECT_F         m_rectCurrentViewport_f;

	public:
		CScreenD2D();
		virtual ~CScreenD2D();

		virtual HRESULT     BKSS_ScreenView_Init(ScrsParams &sspar, CWnd *pwndScr, CWnd *pwndFullScr);
		virtual void        BKSS_ScreenView_Done();
		virtual void        BKSS_DrawScreen();
		virtual BOOL        BKSS_SetFullScreenMode();
		virtual BOOL        BKSS_SetWindowMode();
};


